Here is where I have started:
#Get Physical Memory
function getwmiinfo ($svr) {
gwmi -query "select * from
Win32_PhysicalMemory" -computername $svr | select [$svr], DeviceLocator
}
$Servers = get-content -path "C:\test.txt"
foreach($Servers in $Servers) {
getwmiinfo $Servers
}
I get this:
[risk] DeviceLocator
------ -------------
DIMM0
DIMM1
What I want is this:
ServerName DeviceLocator
---------- -------------
RISK DIMM0
RISK DIMM1
Is this possible? How would I do it. I have spent hours on this and can't quite get it to work. Thanks!