Friday, 1 May 2009

Quadrillions of bytes…

With PowerShell v1 came a set of administrative constants that made it easier to easily display storage values in MB, GB etc.  PS v2 has gone even more enterprise-class as shown below:

image

Yep, you can easily report disk space in terabytes and petabytes.  So this bit of code…

image

 

…shows how much space I’ve got free on my C: drive in petabytes.  Even with a 134GB of free space on the notebook I did this on I had to format the output to 5 decimal places to show a readable value!

No comments:

Post a Comment