Get a brief Storage Spaces Status Overview via Powershell
One of the things I like with Powershell is the way you can handle object output and format conversations in a very easy and efficient way. In this example I’m going to show a Powershell script to generate a HTML report on the current Windows Storage Spaces Status. Although you can monitor the most relevant eventlogs like Cluster and Storage Spaces driver, it’s useful to have a single script, which generates a brief overview about the Windows Storage Space status and it’s configuration.
The current script leverages the SES and Storage CMDLETS of Windows Server 2012 R2 and reports the following information:
- Report Generation Time, Reported Node
- Storage Pools
- Storage Enclosures
- Virtual Disks incl. Storage Tiers
- Physical Disks to Enclosure Mapping
- MPIO Path Information per physical Disk
- Storage Spaces Driver Events
I’m using the script to document deployments and to have a comfortable way identifying failed components by their location and serial number. It also allows to send the report directly via Email.
Let’s have a look at the results..
As you can see in the example below, everything looks cosy 🙂
The colours change depending on the status of the components. The next example shows a degraded Storage Pool as well as the degraded underlying Spaces because of a disk failure (loss).
The script also reports MPIO Path information for every physical disk within the Storage Pool(s).
Where to get a copy of the script
You can download a copy of the script on TechNet.
How to use it
Requirements:
- Server 2012 R2
- Administrative privileges on the remote node (storage node)
- WinRM allowed
Here’s an example on how to use it.
.\GetStorageReport.ps1 -StorageNode SOFSN01 -IncludeMPIO -IncludeEvents -OpenFileAfterCreation
For more information use
Get-Help .\CreateStorageReport.ps1 -Full
If you have any comments or feedback, please use the TechNet Q+A or ping me on Twitter
Other helpful scripts
Storage Health Test Script by Jose Barreto