Get-PSDrive c使用MB和GB的空间

时间:2016-04-15 20:34:26

标签: powershell

 var parking_duur_hensbergen = getParkingDuration();

        chart = c3.generate({
          point: {
            r: function (d) {
              for (var j = 0; j < parking_duur_hensbergen.length; j++) {
                console.log(parking_duur_hensbergen[j]);
                return parking_duur_hensbergen[j] / 10000;
              }
            }
          }

如何在MB和GB中获取C驱动器已用空间的值? 我环顾四周,找不到合适的答案。请帮助。感谢!!!

2 个答案:

答案 0 :(得分:1)

基本字节转换可行。 organized process for discovery of commonality across and within multiple levels (see heading "Refactoring to Product Lines")

$drive = get-psdrive c
$used_size = $drive.used
write-host "MB:" ($used_size / 1MB)
write-host "GB:" ($used_size / 1GB)

答案 1 :(得分:0)

我使用Get-WmiObject win32_logicaldisk -Filter“DeviceID ='C:'”