Solved

how can I find the SID of a server with PSTOOLS for every server on the domian?

Posted on 2014-11-06
2
194 Views
Last Modified: 2014-12-02
is this possible??????

thanks
0
Comment
Question by:NAMEWITHELD12
2 Comments
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 250 total points
ID: 40427071
use this in PowerShell

clear
$Servers = Import-Csv "c:\temp\servers.csv"
$Servers | % {Get-ADComputer -Filter "name -eq '$($_.server)'" } | Select-Object dnshostname , sid | Export-Csv c:\temp\serverSids.csv

Open in new window

All you need is a csv file with one field called Server

e.g.

Server
nameofserver1
nameofserver2
nameofserver999
0
 
LVL 16

Accepted Solution

by:
Joshua Grantom earned 250 total points
ID: 40427107
Or you can lookup by querying the entire domain, no need for a list

Get-ADComputer -Filter 'OperatingSystem -like "*Server*"' | Select-Object Name,dnshostname,sid | Export-Csv C:\ServerSIDs.csv -nti

Open in new window


or if all of your servers are in one OU

Get-ADComputer -Filter * -SearchBase "OU=Servers,DC=DOMAIN,DC=COM" | Select-Object Name,dnshostname,sid | Export-Csv C:\ServerSIDs.csv -nti

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

896 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

15 Experts available now in Live!

Get 1:1 Help Now