Created
May 8, 2013 18:38
-
-
Save anonymous/5542568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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