-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmountpoints.ps1
25 lines (21 loc) · 1.01 KB
/
mountpoints.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<#
.NOTES
===========================================================================
Created on: 10/02/2021 18:19
Created by: Ryan Mangan
Organization: Ryanmangansitblog ltd
Website: https;//ryanmangansitblog.com
Filename: mountpoints.ps1
===========================================================================
.DESCRIPTION
This script lists all mountpoints on the OS. This helps you identify the difference between local disks, Virtual Disks and CIMFS.
#>
$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) } }
function get-mountpoints
{
$volumes = Get-WmiObject win32_volume -Filter "DriveType='3'"
$volumes | Select Name, Label, FileSystem | Format-Table -AutoSize
}
get-mountpoints