Skip to content

Instantly share code, notes, and snippets.

Created Jun 13, 2017
What would you like to do?
Get-ADObject -LDAPFilter "(sIDHistory=*)" -Property objectClass, distinguishedname, samAccountName, objectSID, sIDHistory |
Select-Object objectClass, DistinguishedName, SamAccountName, objectSID -ExpandProperty SIDHistory |
ForEach-Object {
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