Posts

Showing posts from December, 2014

PowerShell domain disk statistics & block size report

Image
We've been battling with disk block size issues on our SAN since we got it.  We're to a point where we're converting all our exiting VMs over to 32k block size disks.  Our SAN kind of requires it to function smoothly. The below PowerShell script builds off my last domain disk script and adds the block size of the NTFS partition.  It lists the disk alongside the VMFS datastore it is stored on.  Using it you can easily see if the disk is on the proper data store. gging. The script emails an HTML formatted report that shows each disk, its size, how much is used, it's block size, the datastore it's on, and how much space is left.  It also writes an HTML file to C:\Scripts so you can manually load up the output for testing. I run this as needed with domain admin rights.  Change $Debug to $True to get console output while it runs. Below is an example of the output as seen in email: clear-host   $ErrorActionPreference = ...