Advertisement
htpUcp

Untitled

Jul 5th, 2022
816
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.23 KB | None
  1. $disk = Get-WmiObject Win32_LogicalDisk -Filter "DeviceID='C:'" | Select-Object Size, FreeSpace
  2. Write-Host ("{0}GB total" -f [math]::truncate($disk.Size / 1GB))
  3. Write-Host ("{0}GB free" -f [math]::truncate($disk.FreeSpace / 1GB))
Advertisement
RAW Paste Data Copied
Advertisement