Updated script – with Multi-value support. http://portal.sivarajan.com/2011/04/sidhistory-report-with-multi-value.html
This PowerShell Script can used to search a user object in Active Directory domain and generate a report with their SIDHistory value.
As you can see in the following screenshot, the output file (userinfo.txt) contains the SamAccontName and its SIDHistory value:
When a User object migrated from one domain to another, a new SID must be generated for the user account and stored in the ObjectSID property. Before the new value is written to the property, the previous value (ObjectSID from source domain) is copied to another property of a User object, sIDHistory in the Target domain. So you can use the sIDHistory value to search the Source domain using the ObjectSID attributes to identify the corresponding user in the Source domain. In other words, the sIDHistory value will be equal to the source ObjectSID.
Search sIDHistory value of a migrated user using DSQUERY and identify the corresponding ObjectSID in the source domain.
More Scripts: http://www.sivarajan.com/scripts.html