Changes between Version 6 and Version 7 of jazz/20-04-25


Ignore:
Timestamp:
Apr 25, 2020, 2:22:46 PM (4 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/20-04-25

    v6 v7  
    9292PS C:\Users\yawang>
    9393}}}
     94
     95== PowerShell ==
     96
     97* https://learn-powershell.net/2012/08/10/locating-mount-points-using-powershell/
     98{{{
     99Get-WmiObject Win32_Volume | Format-Table Name, Label, FreeSpace, Capacity
     100}}}
     101{{{
     102Get-WmiObject Win32_Volume -Filter "DriveType='3'" | ForEach {
     103    New-Object PSObject -Property @{
     104        Name = $_.Name
     105        Label = $_.Label
     106        FreeSpace_GB = ([Math]::Round($_.FreeSpace /1GB,2))
     107        TotalSize_GB = ([Math]::Round($_.Capacity /1GB,2))
     108    }
     109}
     110}}}