In PowerShell, Get-WMIObject is a terrific cmdlet for remotely managing systems. If you have a text list of server or computer names, here's a quick method you could enumerate that list and do something to each server.
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
foreach ($server in (Get-Content s:\servers.txt)) {
#skip blank lines
if (($server).length -gt 0)
{ $server
Get-WmiObject win32_operatingsystem -computer $server.Trim()}
}
S:\Servers.text is just a text file like this:
Server1
Server2
DC1
Server3
The ForEach loop reads the contents of the file, assigning the name to $server. I've added some code to catch blank lines that sometimes end up at the end of files like this. If the length of $server is greater than 0 than process the server. The code sample will echo the name to the console and then run the Get-WMIObject cmdlet passing $server as the computername. I found it helpful to call the Trim method as an extra space can confuse PowerShell.
I'm not saying this is the only way to do something like this but it works for me.