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

Conversation

mbrancato
Copy link
Contributor

Pull the SID directly from the 'krbtgt' user to avoid errors in ConvertTo-SID

This produces the SID from the 'krbtgt' user just as the following:

$ForestSid = (New-Object System.Security.Principal.NTAccount($ForestObject.RootDomain.Name,"krbtgt")).Translate([System.Security.Principal.SecurityIdentifier]).Value $Parts = $ForestSid -Split "-" $ForestSid = $Parts[0..$($Parts.length-2)] -join "-"

Pull the SID directly from the 'krbtgt' user to avoid errors in ConvertTo-SID
@HarmJ0y
Copy link
Contributor

HarmJ0y commented Jan 8, 2017

Looks good, thanks.

@HarmJ0y HarmJ0y merged commit 8552033 into PowerShellMafia:dev Jan 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants