Solved

Can Active Directory user account SID be exported to file?

Posted on 2011-09-30
6
4,730 Views
Last Modified: 2012-05-12
Points of My Scenario
1. I am admin of a Windows Server 2003 domain
2. I have a cross-forest trust with an external forest & domain
3. Users must be migrated to the external domain
4. I have been tasked to provide the SID history of my domain users (I'm not sure this is a proper request).
QUESTION: Can the SID history of accounts be exported to file?
0
Comment
Question by:waltforbes
6 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 36894735
You can use a tool called adfind

http://www.joeware.net/freetools/tools/adfind/index.htm

adfind -default -f "&(objectcategory=person)(objectclass=user)(sidhistory=*)" samaccountname sidhistory

That will only list users that have sidhistory populated.  

Thanks

Mike
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 36894946
I think what you want to do is use the Active Directory Migration Tool - ADMT - check it out.
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 36896140
That's strange. Why they want to have SIDs of all of your users? Maybe they want to somehow enumerate them in the new domain (I don't know). As leew mentioned, to migrate users from one domain into another you have to use ADMT which creates SID History for an object automatically.

SID is unique for each object, so when you migrate user into another domain, its SID is assigned from that domain SID's database and it's also unique within that domain. The only difference for existing user in the domain is that SID History is set up with SID from previous domain to preserve access to network resources without changing ACLs on files/folders by administrator.

Anyway, if you wish to export all user SIDs to text file, you can use Microsoft DS Tools for that, Quest PowerSHell module for AD or mentioned ADFIND by Mike.

To export SIDs using DS Tools, run this syntax on any DC or workstation with Administrative Tools installed

dsquery * -filter "&(&(objectClass=User)(objectCategory=Person))" -limit 0 -attr sAMAccountName givenName sn objectSID >>c:\SIDs.txt

for Quest PowerShell use

Get-QADUser -name * -sizelimit 0 | Select sAMAccountName,givenName,sn,objectSID | Export-CSV c:\SIDs.csv

or modify a little bit Mike's ADFIND example (if you wish to use ADFIND)

Regards,
Krzysztof
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 500 total points
ID: 36896177
Actually for Quest PS syntax it's better to use SID attribute, instead of objectSID.
So, proper syntax is

Get-QADUser -name * -sizelimit 0 | Select sAMAccountName,givenName,sn,SID | Export-CSV c:\SIDs.csv

Krzysztof
0
 

Author Closing Comment

by:waltforbes
ID: 36903923
To iSiek: this is EXACTLY what I needed. I am sooo grateful! Many, many thanks!
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 36904264
You're welcome :)
I'm glad I could help

Krzysztof
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
Resolve DNS query failed errors for Exchange
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now