Solved

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

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

thanks
0
Comment
Question by:NAMEWITHELD12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
#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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

705 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