Pure Storge PowerShell Toolkit Enhancements

@8arkz – September 11/17 — The “Original” version of the PowerShell Toolkit v2.8.0.430 has been deprecated in favor of the PowerShell SDK. Read all about it here.

Lots of updates!

Enhancements

New Session Management

Previous version called Connect and Disconnect methods on every call. I took this approach to simplify end user implementation. This was a bad model based on the number of identical calls and more importantly did not allow for multi-array session management. Using a single PowerShell session multi-arrays can be managed now. The example below shows how two different FlashArrays can be connected and tasks submitted by using the different $MySession variables.

The end user is now responsible for connecting and disconnecting from the individual sessions.

New cmdlet functions added:

Get-PfaPorts

Description: Retrieve ports on the FlashArray. Example results.

Example

Get-PfaInitiators

Description: Retrieve all of the initiators connected to the FlashArray. Example return.

Example

Get-PfaHostGroupSpace

Description: Used to retrieve details about the specific host group. Using this cmdlet will provide results similiar to the below example.

Example

Get-PfaHostGroup

Description: Retrieve information about an existing host group.

Example

Connect-PfaHostGroup

Description: Use to connect a volume to a host group.

Example

Open-PureStorageGitHub

Description: Easy cmdlet to open the GitHub repository for the toolkit, will use your default browser.

Example

Refresh-PfaVolume

Description: As part of taking snapshots and creating new volumes from those snapshots we provide a mechanism to refresh a volume, in REST API terms we call it overwrite. Using this cmdlet will take an existing volume that was created from a snapshot and refresh the underlying volume with the latest source data.

Example

Eradicate-PfaVolume

Description: This function was created mostly for my dev/test procedures while developing the toolkit. On a Pure Storage FlashArray an administrator can destroy a volume which goes into what I call our volume recycle bin for 24 hours. After 24hrs the volume is eradicated from the system. A nice feature for those “oh crap I deleted volume/snapshot X”. Using this cmdlet is immediately destructive to a volume.

Example

Latest v2.8.0.430 can be downloaded from https://github.com/PureStorage-OpenConnect/powershell-toolkit-2.8.0.430.

Big shout out to ‘Master of the Hat’ for sending feedback and putting the toolkit through some great testing in a real-world proof-of-concept environment.

As always hit me up https://twitter.com/8arkz or barkz@purestorage.com with questions/comments.