I am happy to announce the release of the 1.0 version of the Pure Storage PowerShell Toolkit for use with the Purity 4.0 and the REST API 1.2.
The PowerShell command window below shows the 1.0 version loaded and a few of the commands that are exported.
- Download the ZIP archive from and save to your desktop or location of your choice.
- Right-Click ZIP archive and select Extract All…
- For the “Files will be extracted to this folder:” enter C:\Windows\System32\WindowsPowerShell\v1.0\Modules or it can be placed in \Documents\WindowsPowerShell\Modules under your Documents directory.
- Execute Import-Module from the above directory specifying the PureStorage.PowerShell.Toolkit.psd1 Module Manifest.
- To validate that the Module is loaded type Get-Module and you should see as illustrated above.
The ZIP archive has 2 files:
- PureStorage.PowerShell.Toolkit.psd1 – Module Manifest – Defines the module.
- PureStorage.PowerShell.Toolkit.psm1 – Script Module – Defines the functions.
Current functionality provides support for the following:
- Create a new snapshot
New-PfaSnapshot -FlashArray 0.0.0.0 -SnapshotVolume SAMPLE -SnapshotSuffix ([Guid]::NewGuid())
- Creating a new volume
New-PfaVolume -FlashArray 0.0.0.0 -Name SAMPLE3 -Size 500M
- Creating a new volume from a source
New-PfaVolume -FlashArray 0.0.0.0 -Name SAMPLE4 -Source SAMPLE1
- Connecting a host and volume
Connect-PfaHost -FlashArray 0.0.0.0 -HostName MYHOST -Volume SAMPLE4
- Retrieving volume statistics
Get-PfaVolumeStatistics -FlashArray 0.0.0.0 -Volume SAMPLE4
Note: The default Username and Password for the Pure Storage FlashArray is used but this can be overridden with Connect-PfaController –Username X –Password X. For this initial release please test using the standard username/passwords that customers would use.
You will notice that the acronym “Pfa” is used as a key identifier for the cmdlets, this is the naming convention we will be using moving forward when we release a more comprehensive PowerShell Module. This version of the PowerShell toolkit for Pure Storage is targeted at showing developers, customers, partners how they can use our REST API to develop their own scripts/modules.
A few tips…
When working in a standard Windows PowerShell command window you can use tab to cycle through the cmdlets available and you will eventually see the cmdlets you are looking to use. As an example type Connect- use tab and you will eventually see Connect-PfaController.
You can also use Get-Help to see the parameters of any cmdlet, example:
I will be continuing to add support for additional REST API functions as the weeks go by! All new updates will be committed to Github @ https://github.com/barkz/PureStoragePowerShellToolkit