takes input list of servers from C:\servers.txt and output the result to C:\ram-cpu.csv
make sure your powershell/powerCLI has admin rights
get-wmiobject Win32_ComputerSystem -computer (gc C:\servers.txt) | select Name,@{name="TotalPhysicalMemory(MB)";expression={($_.TotalPhysicalMemory/1mb).tostring("N0")}},NumberOfProcessors | export-csv C:\ram-cpu.csv
get-wmiobject Win32_ComputerSystem -computer (gc C:\script\servers.txt) | select Name,@{name="TotalPhysicalMemory(MB)";expression={($_.TotalPhysicalMemory/1mb).tostring("N0")}},NumberOfProcessors,NumberOfLogicalProcessors | export-csv C:\ram-cpu.csv
ReplyDeleteThank you...
ReplyDelete