Share via


remove sidhistory for one user

Question

Thursday, September 15, 2011 2:34 AM

Is there any way to use the set-aduser command to remove the sidhistory for one user at a time?  I can only find examples for the entire directory.

 

Thanks

All replies (3)

Saturday, September 17, 2011 3:00 PM ✅Answered

Hi,

 

Please refer to the following Microsoft TechNet article and check if the example is what you need.

 

SID History Removal

http://technet.microsoft.com/en-us/library/powershell_remove_sid_history(WS.10).aspx

 

In addition, this question is related to Windows PowerShell. For PowerShell issue, the best resource is PowerShell forum. 

 

Based on the current situation, I will move your question to Windows Powershell forum for further assistance. In this way, your issue can be resolved effectively.

 

Thanks for your understanding!

 

Regards,

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Sunday, September 18, 2011 1:27 PM ✅Answered

Here are some more options:

**PowerShell - **

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

VB Script:

How To Use Visual Basic Script to Clear SidHistory - http://support.microsoft.com/kb/295758

**Using ADfind - **http://www.joeware.net/freetools/tools/admod/usage.htm

 

 

adfind -default -f sidhistory=* sidhistory -adcsv | admod -sc csh –unsafe

 

 

Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+| Houston, TX
Blogs - http://blogs.sivarajan.com/

This posting is provided AS IS with no warranties,and confers no rights.


Monday, December 19, 2011 9:10 PM

Hi,

This article explains how you can target SID history removal to a single user with PowerShell:

http://blogs.technet.com/b/ashleymcglone/archive/2011/11/23/how-to-remove-sid-history-with-powershell.aspx

Ashley

Mr. Ashley McGlone Microsoft Premier Field Engineer http://blogs.technet.com/b/ashleymcglone