Merge pull request #205 from mbrancato/dev
Fix errors gathering the forest SID
This commit is contained in:
commit
8552033242
|
|
@ -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 '-'
|
||||
|
|
|
|||
Loading…
Reference in New Issue