Last active
December 22, 2017 14:37
-
-
Save kort3x/6da732987d4d91888cc23c0c025e9669 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$disks = Get-CimInstance -ClassName Win32_LogicalDisk | |
ForEach ($disk in ($disks | where Drivetype -EQ 3)) { | |
$Data = @( | |
@{Space="used";Count=([Math]::Round((($disk.Size / 1GB) - ($disk.FreeSpace / 1GB)), 2))} | |
@{Space="free";Count=([Math]::Round($disk.FreeSpace / 1GB, 2))} | |
) | |
New-UDColumn -Size 2 { | |
New-UDChart -Title "$($disk.DeviceID)" -Type Doughnut -Options @{cutoutPercentage = 0} -Endpoint { | |
$Data | Out-UDChartData -LabelProperty "Space" -Dataset @(New-UDLineChartDataset -Label "Disk" -DataProperty Count) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment