Update PowerView.ps1

userparameters will be throw error ,when use Export-Clixml,
This commit is contained in:
Explorer1092 2019-04-27 14:11:19 +08:00 committed by GitHub
parent f94a5d298a
commit cc8559e535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -3210,6 +3210,9 @@ A custom PSObject with LDAP hashtable properties translated.
$ObjectProperties[$_] = [datetime]::fromfiletime($Properties[$_][0])
}
}
elseif ($_ -eq 'userparameters') {
$ObjectProperties[$_] = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($Properties[$_][0]))
}
elseif ( ($_ -eq 'lastlogon') -or ($_ -eq 'lastlogontimestamp') -or ($_ -eq 'pwdlastset') -or ($_ -eq 'lastlogoff') -or ($_ -eq 'badPasswordTime') ) {
# convert timestamps
if ($Properties[$_][0] -is [System.MarshalByRefObject]) {