Skip to content

Instantly share code, notes, and snippets.

Created May 8, 2013 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5542568 to your computer and use it in GitHub Desktop.
Save anonymous/5542568 to your computer and use it in GitHub Desktop.
get-content C:\IPlist.txt | ForEach-Object {
[System.Net.Dns]::GetHostEntry($_)
} | Select-Object HostName | foreach-object {
Get-WmiObject -Class win32_computersystem -ComputerName $_.HostName -Credential Domain01\DomainAdmin -Property Name, NumberofLogicalProcessors, NumberofProcessors, totalphysicalmemory
Get-WmiObject -Class win32_operatingsystem -ComputerName $_.HostName -Credential Domain01\DomainAdmin -Property Caption
} | ft @{name="Server Name"; Expression={$_.name}}, @{name="Operating System"; Expression={$_.Caption}}, @{name="Physical Processors"; Expression={$_.numberofprocessors}}, @{name="Logical Processors"; Expression={$_.numberoflogicalprocessors}}, @{name="Physical Memory (GB)"; Expression={$([Math]::round(($_.totalphysicalmemory / 1gb)))}} -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment