Solved

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

Posted on 2014-11-06
2
185 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
#Citrix #POC #XenDesktop #vCenter #VMware #ESX
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

707 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

14 Experts available now in Live!

Get 1:1 Help Now