Pure Storage PowerShell SDK 1.7.4.0 Released

This new release adds support for connecting to Pure Storage FlashArray using IPv6. The only change in the connectivity process using New-PfaArray is using an IPv6 address for the EndPoint parameter. See the example below:

PS C:\> $FlashArray = New-PfaArray -EndPoint 2620:125:9004:2021::202 -Credentials (Get-Credential) -IgnoreCertificateError
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:

PS C:\> $FlashArray
Disposed : False
EndPoint : 2620:125:9004:2021::202
UserName : pureuser
ApiVersion : 1.7
Role : ArrayAdmin
ApiToken : 0000000-0000-0000-0000-00000000000

Install or download the new PowerShell SDK through all the normal channels:

PowerShell Gallery
https://www.powershellgallery.com/packages/PureStoragePowerShellSDK/1.7.4.0

Check for the PureStoragePowerShellSDK:

PS C:\> Get-Module -ListAvailable | ?{ $_.name -like '*PureStorage*' }
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name                        ExportedCommands
---------- ------- ----                        ----------------
Binary     1.6.6.0 PureStoragePowerShellSDK    {Disable-PfaAlert, Enable-PfaAlert, Get-PfaAlert, Get-PfaAlerts...}

Install the new PureStoragePowerShellSDK 1.7.4.0:

PS C:\> Install-Module -Name PureStoragePowerShellSDK -RequiredVersion 1.7.4.0
PS C:\> Get-Module -ListAvailable | ?{ $_.name -like '*PureStorage*' }
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name                        ExportedCommands
---------- ------- ----                        ----------------
Binary     1.7.4.0 PureStoragePowerShellSDK    {Disable-PfaAlert, Enable-PfaAlert, Get-PfaAlert, Get-PfaAlerts...}
Binary     1.6.6.0 PureStoragePowerShellSDK    {Disable-PfaAlert, Enable-PfaAlert, Get-PfaAlert, Get-PfaAlerts...}

You will notice that there are now two versions of the SDK installed on your system. Even if you use Update-Module this will be the case. This is an issue I am looking into because 1.6.6.0 should be updated to 1.7.4.0 using Update-Module. In the meantime use the Uninstall-Module cmdlet from PowerShellGet to remove the older version:

PS C:\> Get-Module -ListAvailable | ?{$_.name -like '*PureStorage*'}
 Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType    Version Name                        ExportedCommands
----------    ------- ----                        ----------------
Binary        1.7.4.0 PureStoragePowerShellSDK    {Disable-PfaAlert, Enable-PfaAlert, Get-PfaAlert, Get-PfaA...
Binary        1.6.6.0 PureStoragePowerShellSDK    {Disable-PfaAlert, Enable-PfaAlert, Get-PfaAlert, Get-PfaA...


PS C:\> Uninstall-Module -Name PureStoragePowerShellSDK -RequiredVersion 1.6.6.0
PS C:\> Get-Module -ListAvailable | ?{$_.name -like '*PureStorage*'}
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType    Version Name                        ExportedCommands
----------    ------- ----                        ----------------
Binary        1.7.4.0 PureStoragePowerShellSDK    {Disable-PfaAlert, Enable-PfaAlert, Get-PfaAlert, Get-PfaA...

GitHub
http://github.com/purestorage-connect/PowerShellSDK

The GitHub repo provides an installation package for those customers that cannot use the PowerShell Gallery.

Cheers,
Barkz

 

4 comments
  1. Is it possible to get the total data reduction value (without thin provisioning) displayed in the Get-PfaArraySpaceMetrics?

    • When using the Get-PfaArraySpaceMetrics you can do the following to just show the data_reduction for the FlashArray:

      C:\Windows\system32> Get-PfaArraySpaceMetrics -Array $f | select data_reduction
      data_reduction
      ————–
      13.0636148

      vs using no selection:

      C:\Windows\system32> Get-PfaArraySpaceMetrics -Array $f
      capacity : 6138513221223
      hostname : solutions-lab-m20-c09-29
      system : 0
      snapshots : 5823577340
      volumes : 12294740674
      data_reduction : 13.06193
      total : 176223176378
      shared_space : 158104858364
      thin_provisioning : 0.9617694
      total_reduction : 341.6618

      HTH,
      Barkz

    • When using the Get-PfaArraySpaceMetrics you can do the following to just show the data_reduction for the FlashArray:
      C:Windowssystem32> Get-PfaArraySpaceMetrics -Array $f | select data_reduction
      data_reduction
      ————–
      13.0636148

      vs using no selection:
      C:Windowssystem32> Get-PfaArraySpaceMetrics -Array $f
      capacity : 6138513221223
      hostname : solutions-lab-m20-c09-29
      system : 0
      snapshots : 5823577340
      volumes : 12294740674
      data_reduction : 13.06193
      total : 176223176378
      shared_space : 158104858364
      thin_provisioning : 0.9617694
      total_reduction : 341.6618

      HTH,
      Barkz

Leave a Reply to Garrick Dunkley Cancel Reply

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.