good-arrow’s blog

https://good-arrow.net/

(Powershell)ディスク使用量をパーセント(%)で取得する

Windows Server のディスク容量を自動でチェックする用。

$vol = Get-Volume C
(($vol.Size - $vol.SizeRemaining) / $vol.Size).ToString("0.00 %")