Function ListLogicalDisk {
$colItems = get-wmiobject -class "Win32_LogicalDisk" -namespace "root\CIMV2" -computer $args[0]
write-Host "Disk Information"
foreach ($objItem in $colItems) {
write-host "Description: " $objItem.Description
write-host "Device ID: " $objItem.DeviceID
write-host "Free Space: " $objItem.Freespace
write-host "Size: " $objItem.Size
write-host "Status: " $objItem.Status
write-host
}
}
|