$computername='MyComputerName'
Get-WmiObject win32_logicaldisk -ComputerName $computername -Filter {freespace>0} | Format-Table @{l='Computername';e={$computername}},@{l='Drive';e={$_.DeviceID}},@{l='Size';e={(($_.Size/1024)/1024)/1024}}, @{l='FreeSpace';e={(($_.FreeSpace/1024)/1024)/1024}}
Get-WmiObject win32_logicaldisk -ComputerName $computername -Filter {freespace>0} | Format-Table @{l='Computername';e={$computername}},@{l='Drive';e={$_.DeviceID}},@{l='Size';e={(($_.Size/1024)/1024)/1024}}, @{l='FreeSpace';e={(($_.FreeSpace/1024)/1024)/1024}}
No comments:
Post a Comment