A collection of PowerShell scripts for working with Pure Storage FlashArray systems via the PureStoragePowerShellSDK2 module.
- PowerShell 7+ (cross-platform) or Windows PowerShell 5.1
PureStoragePowerShellSDK2module:Install-Module PureStoragePowerShellSDK2 -Scope CurrentUser
- Network access to each FlashArray management endpoint and credentials with read access to drive and hardware data.
Lists flash module (drive) capacity and hardware details from one or more
FlashArrays. Drive records from Get-Pfa2Drive are joined with chassis/bay
metadata from Get-Pfa2Hardware on the Name field (e.g. CH0.BAY0) and
sorted naturally so BAY10 follows BAY9.
| Name | Type | Required | Description |
|---|---|---|---|
-ArrayEndpoints |
string[] |
Yes | One or more FlashArray management endpoints (FQDN or IP). Comma-separate multiple values. |
-Csv |
switch |
No | Emit a single combined CSV stream to stdout. Suppresses per-array host headers. |
-CsvPath |
string |
No | Write CSV to the specified file (UTF-8). Implies -Csv. |
The script prompts once for credentials at start (Get-Credential); the same
credential object is reused for every endpoint.
# Human-readable Format-List view for a single array
.\Get-PfaModuleCapacity.ps1 -FlashArrayEndpoints array1.example.com
# Multiple arrays, host output with colored per-array headers
.\Get-PfaModuleCapacity.ps1 -FlashArrayEndpoints array1.example.com,array2.example.com
# CSV to stdout (pipe or redirect as needed)
.\Get-PfaModuleCapacity.ps1 -FlashArrayEndpoints array1.example.com -Csv > modules.csv
# Combined CSV from multiple arrays written to a file
.\Get-PfaModuleCapacity.ps1 -FlashArrayEndpoints array1.example.com,array2.example.com -CsvPath modules.csvFor full parameter help and additional examples:
Get-Help .\Get-PfaModuleCapacity.ps1 -FullMIT — see LICENSE.