diff options
author | HarmJ0y <will@harmj0y.net> | 2017-01-11 14:03:46 -0500 |
---|---|---|
committer | HarmJ0y <will@harmj0y.net> | 2017-01-11 14:03:46 -0500 |
commit | 6c113b7956f811af66ced410a41b5bf8c6a4981f (patch) | |
tree | dcdd90b277bf7b9784d4d5d8071cfd6538319406 | |
parent | ce19ebd9ed87e92f52e02c55d50d077d92e9db52 (diff) | |
download | PowerSploit-6c113b7956f811af66ced410a41b5bf8c6a4981f.tar.gz PowerSploit-6c113b7956f811af66ced410a41b5bf8c6a4981f.zip |
Fixed bug in Convert-ADName that output an array including null values instead of a string
-rwxr-xr-x | Recon/PowerView.ps1 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 212b74e..a16e066 100755 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -1563,18 +1563,18 @@ https://gallery.technet.microsoft.com/scriptcenter/Translating-Active-5c80dd67 ) } catch { - Write-Verbose "[Convert-ADName] Error initialiting translation for '$Identity' using alternate credentials : $_" + Write-Verbose "[Convert-ADName] Error initializing translation for '$Identity' using alternate credentials : $_" } } else { try { - Invoke-Method $Translate 'Init' ( + $Null = Invoke-Method $Translate 'Init' ( $ADSInitType, $InitName ) } catch { - Write-Verbose "[Convert-ADName] Error initialiting translation for '$Identity' : $_" + Write-Verbose "[Convert-ADName] Error initializing translation for '$Identity' : $_" } } @@ -1583,7 +1583,7 @@ https://gallery.technet.microsoft.com/scriptcenter/Translating-Active-5c80dd67 try { # 8 = Unknown name type -> let the server do the work for us - Invoke-Method $Translate 'Set' (8, $TargetIdentity) + $Null = Invoke-Method $Translate 'Set' (8, $TargetIdentity) Invoke-Method $Translate 'Get' ($ADSOutputType) } catch [System.Management.Automation.MethodInvocationException] { |