Skip to content

psustevens/My-FlashArray-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My-FlashArray-scripts

A collection of PowerShell scripts for working with Pure Storage FlashArray systems via the PureStoragePowerShellSDK2 module.

Requirements

  • PowerShell 7+ (cross-platform) or Windows PowerShell 5.1
  • PureStoragePowerShellSDK2 module:
    Install-Module PureStoragePowerShellSDK2 -Scope CurrentUser
  • Network access to each FlashArray management endpoint and credentials with read access to drive and hardware data.

Scripts

Get-PfaModuleCapacity.ps1

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.

Parameters

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.

Examples

# 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.csv

For full parameter help and additional examples:

Get-Help .\Get-PfaModuleCapacity.ps1 -Full

License

MIT — see LICENSE.

About

My Everpure FlashArray scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors