Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 6c113b7

Browse files
committed
Fixed bug in Convert-ADName that output an array including null values instead of a string
1 parent ce19ebd commit 6c113b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Recon/PowerView.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,18 +1563,18 @@ https://gallery.technet.microsoft.com/scriptcenter/Translating-Active-5c80dd67
15631563
)
15641564
}
15651565
catch {
1566-
Write-Verbose "[Convert-ADName] Error initialiting translation for '$Identity' using alternate credentials : $_"
1566+
Write-Verbose "[Convert-ADName] Error initializing translation for '$Identity' using alternate credentials : $_"
15671567
}
15681568
}
15691569
else {
15701570
try {
1571-
Invoke-Method $Translate 'Init' (
1571+
$Null = Invoke-Method $Translate 'Init' (
15721572
$ADSInitType,
15731573
$InitName
15741574
)
15751575
}
15761576
catch {
1577-
Write-Verbose "[Convert-ADName] Error initialiting translation for '$Identity' : $_"
1577+
Write-Verbose "[Convert-ADName] Error initializing translation for '$Identity' : $_"
15781578
}
15791579
}
15801580

@@ -1583,7 +1583,7 @@ https://gallery.technet.microsoft.com/scriptcenter/Translating-Active-5c80dd67
15831583

15841584
try {
15851585
# 8 = Unknown name type -> let the server do the work for us
1586-
Invoke-Method $Translate 'Set' (8, $TargetIdentity)
1586+
$Null = Invoke-Method $Translate 'Set' (8, $TargetIdentity)
15871587
Invoke-Method $Translate 'Get' ($ADSOutputType)
15881588
}
15891589
catch [System.Management.Automation.MethodInvocationException] {

0 commit comments

Comments
 (0)