Hello, I'm starting to learn Powershell. I have found this command on the internet and it works very well. I'm loving Powershell.
Get-WmiObject win32_logicaldisk -filter "drivetype=3" -computer (Get-Content "c:\scripts\computers.txt") |
Select Systemname,DeviceID,VolumeName,@{Name="size(GB)";Expression={"{0:N2}" -f($_.size/1gb)}},@{Name="freespace(GB)";Expression={"{0:N1}" -f($_.Freespace/1gb)}} |
out-gridview
I would like to know how to best change this to first check and see if the computer is online and if not list it in outgrid as offline?
v/r
john