This is what I have so far.
Get-ciminstance -class cim_logicaldisk | where-object {$_.Freespace} select-object Freespace,DeviceID
I need to convert it to GB and output it as that. Any help would be appreciated.
This is what I have so far.
Get-ciminstance -class cim_logicaldisk | where-object {$_.Freespace} select-object Freespace,DeviceID
I need to convert it to GB and output it as that. Any help would be appreciated.
Get-CimInstance -ClassName cim_logicaldisk | Where-Object {$_.FreeSpace} | Select-Object @{n='FreeSpace';exp={"{0:N2} GB" -f ($_.FreeSpace / 1GB)}},DeviceID
Thank you!