New! Pure Storage PowerShell SDK 1.16

A long awaited update to the Pure Storage PowerShell SDK is here! The new SDK supports FlashArray REST API 1.0 — 1.16. For full documentation on the REST API use the FlashArray GUI under help. All the new cmdlets have added Get-Help as well. The official release version is 1.16.6. Everything is deployed to the PowerShell Gallery.

Install-Module PureStoragePowerShellSDK

If you would prefer to install using the MSI package head over to https://github.com/PureStorage-Connect/PowerShellSDK and download from the repository.

NFS and S3 Snapshot Offload

  • Connect-PfaOffloadNFSTarget
  • Connect-PfaOffloadS3Target
  • Disconnect-PfaOffloadNFSTarget
  • Disconnect-PfaOffloadS3Target
  • Get-PfaAllProtectionGroupOffloadSnapshot
  • Get-PfaAllVolumeOffloadSnapshot
  • Get-PfaOffloadNFSTarget
  • Get-PfaOffloadS3Target
  • Get-PfaOffloadSnapshot
  • Get-PfaOffloadTarget
  • Get-PfaProtectionGroupOffloadSnapshot
  • Restore-PfaAllVolumeOffloadSnapshot

Directory Services

  • Get-PfaDirectoryServiceRole
  • New-PfaDirectoryServiceRole

Admin and Users

  • Get-PfaAdminSetting
  • Get-PfaAllLockedUser
  • Get-PfaLockedUser
  • Set-PfaAdminSetting
  • Unlock-PfaUser

NVMe-oF (ROCEv2) Support

  • Add-PfaHostNqn
  • Remove-PfaHostNqn
  • Set-PfaHostNqn

Local User Support

  • New-PfaLocalUser
  • Remove-PfaLocalUser

Managing Purity RUN Software

  • New-PfaSoftware
  • Get-PfaSoftware
  • Disable-PfaSoftware
  • Enable-PfaSoftware
  • Remove-PfaSoftware
  • Get-PfaSoftwareAttribute

FlashArray Pod’s

  • Get-PfaAllRemotePod
  • Get-PfaRemotePod
  • Set-PfaHost
  • Set-PfaPod

IO Latency Cmdlets Galore!

  • Get-PfaAllHostGroupIOLatencyMetrics
  • Get-PfaAllHostGroupIOLatencyMetricsMirrored
  • Get-PfaAllHostGroupIOLatencyMetricsTotal
  • Get-PfaAllHostIOLatencyMetrics
  • Get-PfaAllHostIOLatencyMetricsMirrored
  • Get-PfaAllHostIOLatencyMetricsTotal
  • Get-PfaAllPodIOLatencyMetricsMirrored
  • Get-PfaAllVolumeGroupIOLatencyMetrics
  • Get-PfaAllVolumeGroupIOLatencyMetricsByTimeRange
  • Get-PfaAllVolumeGroupsIOLatencyMetricsTotal
  • Get-PfaAllVolumeIOLatencyMetrics
  • Get-PfaAllVolumeIOLatencyMetricsByTimeRange
  • Get-PfaAllVolumeIOLatencyMetricsTotal
  • Get-PfaArrayIOLatencyMetrics
  • Get-PfaHostGroupIOLatencyMetrics
  • Get-PfaHostGroupIOLatencyMetricsMirrored
  • Get-PfaHostIOLatencyMetrics
  • Get-PfaHostIOLatencyMetricsMirrored
  • Get-PfaNamedVolumeGroupsIOLatencyMetricsByTimeRange
  • Get-PfaNamedVolumesIOLatencyMetricsByTimeRange
  • Get-PfaPodIOLatencyMetricsMirrored
  • Get-PfaVolumeGroupIOLatencyMetrics
  • Get-PfaVolumeGroupIOLatencyMetricsByTimeRange
  • Get-PfaVolumeIOLatencyMetrics
  • Get-PfaVolumeIOLatencyMetricsByTimeRange

SMTP and Bandwith Support 

  • Set-PfaVolumeBandwidthLimit
  • Set-PfaSmtpManagerAttribute
  • Get-PfaSmtpManagerAttribute

Updated Cmdlets

  • Get-PfaHost
  • Get-PfaHosts
  • Get-PfaPod
  • Get-PfaPods
  • Get-PfaVolume
  • Get-PfaVolumes
  • New-PfaHost — Added NqnList support.
  • New-PfaPod
  • New-PfaVolume
  • Remove-PfaProtectionGroupOrSnapshot
  • Restore-PfaDestroyedProtectionGroup

The below cmdlets starting with REST API 1.16 no longer return “san_usec_per_read_op” and “san_usec_per_write_op”. These return values are now part of the new cmdlets listed in the IO Latency cmdlets.

  • Get-PfaAllHostIOMetrics
  • Get-PfaHostIOMetricsAverage
  • Get-PfaAllHostIOMetricsTotal
  • Get-PfaArrayIOMetrics
  • Get-PfaArrayIOMetricsAverage
  • Get-PfaAllVolumeIOMetricsByTimeRange
  • Get-PfaNamedVolumesIOMetricsByTimeRange
  • Get-PfaVolumeIOMetrics
  • Get-PfaVolumeIOMetricsByTimeRange
  • Get-PfaAllVolumeIOMetric

Automate Away! //barkz

6 comments
  1. We are upgrading our Flash Arrays from 4.10.10 to 5.3.0 which comes with Rest API version 1.17 and 2.0.
    I have a Powershell script which collects data using:
    Get-PfaArraySpaceMetricsByTimeRange -Array $array -TimeRange 1y
    I’m noticing that the ‘total’ field is now blank even after updating to the latest version of the Pure Storage PowerShellSDK
    Any ideas?

    • Hi David —

      The PowerShell SDK only supports REST 1.16. We are working on both an update to 1.17 and 2.0 support. For REST 1.16 the REST API endpoint returns the below for total. I need to check the cmdlet. Will follow-up once I’ve had a chance to investigate the issue.

      total boolean

      If the action parameter is set to monitor, set this parameter to display (true) performance totals across all volumes. Performance totals appear at the end of the response.

      Optional.

      Thanks — Barkz

  2. is there any command similar to “purevol copy –overwrite SNAPSHOT VOLUME?”
    So to restore a snapshot to a different volume?

    Thanks

    • Hi Fernando —

      In the SDK there is a New-PfaVolume cmdlet. Example: New-PfaVolume -Array $f -VolumeName barkz01 -Source VSS-45084F3508BF4614000286B1 -Overwrite

      You can take any volume and overwrite it with a different snapshot.

      HTH — Barkz

  3. Thank a lot on developing the PowerShell SDK for Pure Storage. I tried to find command to add CHAP to iSCSI Host CHAP, that seems impossible to do via script? I still need to connect to Pure Storage web console to do that, is that the case?

    • Hi Joe — The bad news REST API 1.x (SDK 1.x) does not support CHAP setting. Now the good news, REST API 2.x does support setting CHAP. We have it implemented in the SDK 2.2 which will be released in several weeks.

      Thanks — Barkz

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.