diff options
author | HarmJ0y <HarmJ0y@users.noreply.github.com> | 2017-01-07 18:20:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-07 18:20:56 -0800 |
commit | 855203324211b5087c66c44922ad12c20a5a9413 (patch) | |
tree | 1570ef2d50b32e3516c318e5d1ea1667ffa7139a | |
parent | 5500a7e1311662a8e88d1361ef0d8ab86f8f35b5 (diff) | |
parent | d1060930c7af88730e983155077b56b3cc47a4dc (diff) | |
download | PowerSploit-855203324211b5087c66c44922ad12c20a5a9413.tar.gz PowerSploit-855203324211b5087c66c44922ad12c20a5a9413.zip |
Merge pull request #205 from mbrancato/dev
Fix errors gathering the forest SID
-rwxr-xr-x | Recon/PowerView.ps1 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 17d5b9e..5598dbe 100755 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -3891,10 +3891,10 @@ to the forest root domain SID. if ($ForestObject) { # get the SID of the forest root if ($PSBoundParameters['Credential']) { - $ForestSid = ConvertTo-SID -ObjectName "krbtgt@$($ForestObject.RootDomain)" -Credential $Credential + $ForestSid = (Get-DomainUser -Identity "krbtgt" -Domain $ForestObject.RootDomain.Name -Credential $Credential).objectsid } else { - $ForestSid = ConvertTo-SID -ObjectName "krbtgt@$($ForestObject.RootDomain)" + $ForestSid = (Get-DomainUser -Identity "krbtgt" -Domain $ForestObject.RootDomain.Name).objectsid } $Parts = $ForestSid -Split '-' |