SID history using PowerShell command


SIDHistoryThis is not the SID of ice age it regards to the security identifier of an object located in Active Directory. The user account SID can be extracted using the PowerShell cmdlet and modified them easily.

GUID

To find the properties of user with SID history detail

Get-ADUser “Mail.COM/Region/Asia/Rajis” –properties sidhistory

To search user on specific OU or domain

Get-ADUser -fILTER {nAME -eq “Rajis”} -SearchBase “OU=Asia,OU=Region,DC=MAIL,DC=COM” –properties sidhistory

To remove SID history value as

Get-ADUser -fILTER {nAME -eq “Rajis”} -SearchBase “OU=Asia,OU=Region,DC=MAIL,DC=COM” –properties sidhistory | foreach {Set-ADUser $_ -remove @{sidhistory=$_.sidhistory.value}}

About Raji Subramanian

Nothing great to say about me...Just want to share my knowledge for others that will be useful at any moment of time when they stuck in critical issue....
This entry was posted in Powershell Command and tagged , , . Bookmark the permalink.

Leave a comment