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}}
No comments:
Post a Comment