-
-
Save irwins/1a9847cb4e7b7878aa6bb6998666e07e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADObject -LDAPFilter "(sIDHistory=*)" -Property objectClass, distinguishedname, samAccountName, objectSID, sIDHistory | | |
Select-Object objectClass, DistinguishedName, SamAccountName, objectSID -ExpandProperty SIDHistory | | |
ForEach-Object { | |
[PSCustomObject]@{ | |
ObjectClass = $_.objectClass | |
DistinguishedName = $_.DistinguishedName | |
SamAccountName = $_.SamAccountName | |
SID = $_.ObjectSID | |
DomainSID = $_.AccountDomainSID | |
SIDHistory = $_.Value | |
} | |
} | | |
Out-GridView -Title "AD Objects with SIDHistory" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment