Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3" |
Format-Table deviceid,
@{Label="free(GB)"; Expression={($_.freespace/1GB).tostring("f1")}},
@{Label="size(GB)"; Expression={($_.size/1GB).tostring("f1")}},
@{Label="percentage(%)";Expression={"{0:p}" -f($_.freespace/$_.size)}}-AutoSize
get-psdrive -psprovider filesystem
遍历分区大小
时间: 2024-11-08 11:21:07