SID History Removal

Updated: January 10, 2011

Applies To: Windows Server 2008 R2, Windows Server 2008 R2 with SP1, Windows Server 7

This topic explains how to use the Active Directory module for Windows PowerShell to remove the SID history of a user.

Example

Get-ADUser –filter ‘sidhistory –like “*”’ –searchbase “dc=name,dc=name” –searchscope subtree –properties sidhistory | foreach {Set-ADUser $_ -remove @{sidhistory=$_.sidhistory.value}}

Additional information

For a full explanation of the parameters that you can pass to Get-ADUser and Set-ADUser, at the Active Directory module command prompt, type Get-Help Get-ADUser –detailed or Get-Help Set-ADUser –detailed, and then press ENTER.