From 6c113b7956f811af66ced410a41b5bf8c6a4981f Mon Sep 17 00:00:00 2001 From: HarmJ0y Date: Wed, 11 Jan 2017 14:03:46 -0500 Subject: Fixed bug in Convert-ADName that output an array including null values instead of a string --- Recon/PowerView.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Recon/PowerView.ps1') 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] { -- cgit v1.2.3