Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: I'm doing it wrong – calculation not working

$
0
0

No problem! :) BTW, I don’t know if you’re aware of this, but you don’t need to hard-code the value 1073741824. PowerShell gives you a more readable version of that: 1GB

$totalSpaceGB = $wmiDriveSize.Size / 1GB
$freeSpaceGB = $wmiDriveSize.FreeSpace / 1GB

Viewing all articles
Browse latest Browse all 13067

Trending Articles