Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Search a list of servers for a list of user accounts specified in a file?

$
0
0

howdy

I have about 4 domains and standalone servers. The server names are in a list I have which is a text file. I need to search all of the servers for "all local accounts", but I have to search for a specific list of accounts (samaccountname).  

I have found ways to search for "local accounts", but not for "specific" accounts.  Can anyone tell me how I can go about doing this and then reporting on if the accounts exist and on which servers, and if the query fails because of permissions or network issues then write to an error file?

 Thanks much in advance! It is a different approach than I have used as I have queried servers to get members of a group, but not anything like this.  I am lucky enough to have an "admin" account on each of the domains and servers that I used to run the scripts as it's the same name & pass on each domain and workgroup server.  Beer


Viewing all articles
Browse latest Browse all 6937

Trending Articles