Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I'm at my workplace right now and we have a number of servers. I was wondering if there is an easy way to A.) find out the names of all the servers we have here and B.) search across all of the servers we have here for a certain service.

Any ideas?

share|improve this question
If you know powershell then this would be easy as pie. (I.e. write a script that works through all servers in an OU (or list of IPs) and reports their name as well as services). – blacklight Oct 9 '13 at 13:14
No there isn't. There's an easy way to list all the computer accounts in Active Directory, and you can establish servers from there. But Servers not joined to the domain, not running Windows, etc. are not so easy to find - you'll have to start running IP scans and tracing cables to be sure of getting everything. – TessellatingHeckler Oct 9 '13 at 13:16
If you're not the IT person then in what capacity are you performing this search? What level of user rights/permissions does your user account have in the domain? – joeqwerty Oct 9 '13 at 15:23
@joeqwerty also, did you downvote my question? if so why? – Drew Oct 9 '13 at 18:13
@Drew - No, I didn't downvote your question but downvotes are a fact of life here so get used to it. Also, don't take offense with every comment. I asked merely because I was curious. Don't read into it. – joeqwerty Oct 9 '13 at 18:33
up vote 3 down vote accepted

PowerShell can certainly do this for you.

Finding the name of servers within your domain is easy enough, depending on how you want to do it. Are you looking to scan your network for the information? Without recreating the wheel here, Jesse Hamrick wrote an awesome script that will document everything for you here.

Obviously, if you know PowerShell already you can just grab the pieces out of the script that you would need. But, if you don't already have an inventory of your servers (which from your post, seems like you may not), this is an excellent start.

Quick way of searching for a service on all your servers once you have your list:

$servers = "your server list"
foreach($server in $servers){
Get-Service <service name> -ComputerName $server
share|improve this answer
Cool. And I am, well really just trying to figure out whether a service is installed on any of the computers within our domain. Also, is there a way to get the name of all the servers within our domain without having to bother the IT guy? – Drew Oct 9 '13 at 13:22
NET VIEW may give you some of the names, but you'll need permissions to retrieve the services. I suggest speaking with your IT guy, we get very grumpy when you do things behind our backs. :) – cole Oct 9 '13 at 13:25
Cool. And gotcha. And will do! Thanks Cole! – Drew Oct 9 '13 at 14:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.