A Brief History of Time with PowerShell and Pure Storage

September 6, 2017 —

Feeling a little nostalgic today. What an incredible journey the work on our PowerShell SDK has taken over the last 3+ years. It’s hard for me to imagine that things started using SSH pass-thru to our FlashArray to run CLI commands.

PowerShell History

Thanks to all the customers and partners for the feedback.

— 3rdman Team + 12th man

Published on: Jul 25, 2014 @ 20:01 —-

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.

            

Installation instructions:

  1. Download the ZIP archive from  and save to your desktop or location of your choice.
  2. Right-Click ZIP archive and select Extract All…
  3. 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.
  4. Execute Import-Module from the above directory specifying the PureStorage.PowerShell.Toolkit.psd1 Module Manifest.
  5. 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/PureStorage-OpenConnect/powershell-toolkit.

Thanks,
Barkz

2 comments

Add Comment

Required fields are marked *. Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.