- Function get-mountpoints {
- Param(
- [Parameter(Mandatory=$True,Position=1)]
- [Array]$PC
- )
- $volumes=@()
- $TotalGB = @{Name="Capacity(GB)";expression={[math]::round(($_.Capacity/ 1073741824),2)}}
- $FreeGB = @{Name="FreeSpace(GB)";expression={[math]::round(($_.FreeSpace / 1073741824),2)}}
- $FreePerc = @{Name="Free(%)";expression={[math]::round(((($_.FreeSpace / 1073741824)/($_.Capacity / 1073741824)) * 100),0)}}
- $volumes = Get-WmiObject -computer $PC win32_volume | Where-object {$_.name -notlike '\\?\*'}
- $volumes | Select SystemName, Label, Name, $TotalGB, $FreeGB, $FreePerc | Sort-Object name | Write-Output
- }
Saturday, March 15, 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment