Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to find sid's on all computers

Status
Not open for further replies.

Gardener1

IS-IT--Management
Apr 21, 2009
54
US
Does any know of a utility that I can use to get the SIDs of all my workstations?

thanks in advance,
 
I just put together the following script and it should gather what you are looking for. Open a command prompt and copy and paste the following and run it.

Code:
dsquery computer domainroot -limit 500 -name * | dsget computer -sid -dn -L >Computer_SID.txt

By default dsquery will only display a limit of 100 objects, so you may need to increase the limit modifier for dsquery depending on how many machine accounts you have in your domain (500 was a large enough limit to query all machine accounts on my current network). The following script will scan through all computer accounts in Active Directory and output the results of the machine name and its associated SID in list format to a text file named "Computer_SID.txt".

Joey
CCNA, MCSA 2003, MCP, A+, Network+, Wireless#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top