Sneak Peek: Managing a FlashArray//m with the new Pure Storage PowerShell SDK 1.0

There are a lot of exciting things happening at Pure Storage today. Announcing the new FlashArray//m, our new cloud-based management and support with Pure1 and last but not least Evergreen Storage. Along with all of these great announcements I wanted to provide a sneak peek of the soon to be released Pure Storage PowerShell SDK.

As many of you may know Pure Storage started out with an open source PowerShell Toolkit to illustrate how customers, partners and ISVs could leverage our REST API with PowerShell to perform some management and automation tasks. As many of the users that leveraged this initial toolkit know it was delivered through our GitHub open source community and yours truly was the main developer, documentation and sample writer and support. Well all of that is changing with the new SDK!

The new PowerShell SDK provides support for many of the cmdlets that users are already familiar with but fundamentally changes how we handle connections to individual FlashArray’s. No more API Tokens! No more Session parameters! The best way to illustrate what we have done is to show some examples and what better way to do that but by connecting and managing our new FlashArray//m.

Notice below that the ModuleType is now a Binary vs Function as was implemented in the previous Toolkit.

clip_image001

How do you connect to a FlashArray now? We have a new cmdlet, New-PfaArray, which is used to create a FlashArray Object that can be used in subsequent cmdlets. Enumerating the $FlashArray PowerShell object shows the “EndPoint” which maps to an actual FlashArray (physical or virtual port). You can see that the FlashArray//m we connected to is using the REST API 1.4.

clip_image002

Now that we an object that contains the FlashArray//m details we can begin performing many of the same operations that was done previously in the Toolkit.

clip_image003

Here is an example of how to create a new volume.

clip_image004

The below example shows the use of the -WhatIf parameter so you can see the exact REST API JSON that will be executed on the FlashArray. The second example in the below screenshot shows the volume being created.

clip_image005

Here is the view of the FlashArray//m and the new volume Barkz-m-SDK-demo we created.

FlashArraym

FlashArraym_volume

Lots more to come, so keep watching my blog for more details on the new PowerShell SDK! There will also be an update to the Pure Storage PowerShell Toolkit coming as well! So don’t fear the Toolkit will still be here!

Here are some other interesting details about the PowerShell SDK:

  • The SDK will be delivered with a new installer.

clip_image006

  • The installation folder can be changed if you would like. By default the new SDK will be installed in a C:\Program Files\Pure Storage\PowerShell\Modules folder.
  • The $env:PSModulePath will be updated to include the location of the SDK folder set during installation.
  • Help files can be updated using Update-Help.
  • There are 217 cmdlets in this new version. Below is a list of the new cmdlets in SDK 1.0:

    Add-PfaHostGroupsToProtectionGroup
    Add-PfaHostIqns
    Add-PfaHosts
    Add-PfaHostsToProtectionGroup
    Add-PfaHostWwns
    Add-PfaSlaveInterfaces
    Add-PfaTargetArrays
    Add-PfaVolumesToProtectionGroup
    Clear-PfaItemFlag
    Connect-PfaRemoteAssist
    Disable-PfaAlert
    Disable-PfaIdLight
    Disable-PfaNetworkInterface
    Disable-PfaReplicationSchedule
    Disable-PfaSnapshotSchedule
    Disconnect-PfaArray
    Disconnect-PfaRemoteAssist
    Enable-PfaAlert
    Enable-PfaIdLight
    Enable-PfaNetworkInterface
    Enable-PfaReplicationSchedule
    Enable-PfaSnapshotSchedule
    Get-PfaAlert
    Get-PfaAlerts
    Get-PfaAllApiTokens
    Get-PfaAllDriveAttributes
    Get-PfaAllHardwareAttributes
    Get-PfaAllHostGroupSpaceMetrics
    Get-PfaAllHostSpaceMetrics
    Get-PfaAllPublicKeys
    Get-PfaAllSnapshotSpaceMetrics
    Get-PfaAllVolumeIOMetrics
    Get-PfaAllVolumeSnapshots
    Get-PfaAllVolumeSpaceMetrics
    Get-PfaApiToken
    Get-PfaArrayAttributes
    Get-PfaArrayConnections
    Get-PfaArrayId
    Get-PfaArrayIOMetrics
    Get-PfaArrayPorts
    Get-PfaArraySpaceMetrics
    Get-PfaAuditRecords
    Get-PfaBanner
    Get-PfaBlockDifferences
    Get-PfaCertificate
    Get-PfaChapStatus
    Get-PfaChapStatuses
    Get-PfaConnectionKey
    Get-PfaConsoleLock
    Get-PfaControllers
    Get-PfaCurrentCertificate
    Get-PfaCurrentCertificateAttributes
    Get-PfaCurrentIntermediateCertificate
    Get-PfaDirectoryServiceCACertificate
    Get-PfaDirectoryServiceConfiguration
    Get-PfaDirectoryServiceGroups
    Get-PfaDnsAttributes
    Get-PfaDriveAttributes
    Get-PfaEngineId
    Get-PfaFlaggedAuditRecords
    Get-PfaFlaggedMessages
    Get-PfaHardwareAttributes
    Get-PfaHost
    Get-PfaHostGroup
    Get-PfaHostGroups
    Get-PfaHostGroupSpaceMetrics
    Get-PfaHostGroupVolumeConnections
    Get-PfaHostPrivateVolumeConnections
    Get-PfaHosts
    Get-PfaHostSharedVolumeConnections
    Get-PfaHostSpaceMetrics
    Get-PfaHostVolumeConnections
    Get-PfaIdleTimeout
    Get-PfaInitiatorPorts
    Get-PfaMessages
    Get-PfaNetworkInterface
    Get-PfaNetworkInterfaces
    Get-PfaNtpServers
    Get-PfaOpenAuditRecords
    Get-PfaOpenMessages
    Get-PfaPendingDeleteProtectionGroups
    Get-PfaPendingDeleteVolumes
    Get-PfaPersonalities
    Get-PfaPersonality
    Get-PfaPhoneHomeActionStatus
    Get-PfaPhoneHomeStatus
    Get-PfaProtectionGroup
    Get-PfaProtectionGroupRetention
    Get-PfaProtectionGroups
    Get-PfaProtectionGroupSchedule
    Get-PfaProtectionGroupSnapshotReplicationStatus
    Get-PfaProtectionGroupSnapshots
    Get-PfaProtectionGroupSnapshotSpaceMetrics
    Get-PfaProtectionGroupVolumeSnapshots
    Get-PfaProtectionGroupVolumeSpaceMetrics
    Get-PfaProxy
    Get-PfaPublicKey
    Get-PfaRecentAuditRecords
    Get-PfaRecentMessages
    Get-PfaRecentUserSessionRecords
    Get-PfaRelayHost
    Get-PfaRemoteAssistSession
    Get-PfaScsiTimeout
    Get-PfaSenderDomain
    Get-PfaSnapshotSpaceMetrics
    Get-PfaSnmpManager
    Get-PfaSnmpManagers
    Get-PfaSourceProtectionGroups
    Get-PfaSyslogServers
    Get-PfaTargetProtectionGroups
    Get-PfaTotalSnapshotSpaceMetrics
    Get-PfaUserSessionRecords
    Get-PfaVolume
    Get-PfaVolumeHostConnections
    Get-PfaVolumeHostGroupConnections
    Get-PfaVolumeIOMetrics
    Get-PfaVolumes
    Get-PfaVolumeSnapshots
    Get-PfaVolumeSpaceMetrics
    Grant-PfaReplicationToTargetProtectionGroup
    Import-PfaCertificate
    Invoke-PfaPhoneHomeAction
    New-PfaAlert
    New-PfaApiToken
    New-PfaArray
    New-PfaCertificateSigningRequest
    New-PfaHost
    New-PfaHostGroup
    New-PfaHostGroupVolumeConnection
    New-PfaHostVolumeConnection
    New-PfaProtectionGroup
    New-PfaProtectionGroupSnapshot
    New-PfaReplicationConnection
    New-PfaSelfSignedCertificate
    New-PfaV2SnmpManager
    New-PfaV3SnmpManager
    New-PfaVolume
    New-PfaVolumeSnapshots
    Remove-PfaAlert
    Remove-PfaApiToken
    Remove-PfaHost
    Remove-PfaHostGroup
    Remove-PfaHostGroupsFromProtectionGroup
    Remove-PfaHostGroupVolumeConnection
    Remove-PfaHostIqns
    Remove-PfaHosts
    Remove-PfaHostsFromProtectionGroup
    Remove-PfaHostVolumeConnection
    Remove-PfaHostWwns
    Remove-PfaProtectionGroupOrSnapshot
    Remove-PfaReplicationConnection
    Remove-PfaSlaveInterfaces
    Remove-PfaSnmpManager
    Remove-PfaTargetArrays
    Remove-PfaVolumeOrSnapshot
    Remove-PfaVolumesFromProtectionGroup
    Rename-PfaHost
    Rename-PfaHostGroup
    Rename-PfaProtectionGroup
    Rename-PfaSnmpManager
    Rename-PfaVolumeOrSnapshot
    Resize-PfaVolume
    Restore-PfaDestroyedProtectionGroup
    Restore-PfaDestroyedVolume
    Restore-PfaDestroyedVolumeSnapshot
    Revoke-PfaReplicationToTargetProtectionGroup
    Set-PfaArrayName
    Set-PfaBanner
    Set-PfaConsoleLock
    Set-PfaDirectoryServiceArrayAdminGroup
    Set-PfaDirectoryServiceCACertificate
    Set-PfaDirectoryServiceConfiguration
    Set-PfaDirectoryServiceReadOnlyGroup
    Set-PfaDirectoryServiceStorageAdminGroup
    Set-PfaDnsDomain
    Set-PfaDnsNameServers
    Set-PfaHardwareIndex
    Set-PfaHostCredentials
    Set-PfaHostGroupsInProtectionGroup
    Set-PfaHostIqns
    Set-PfaHosts
    Set-PfaHostsInProtectionGroup
    Set-PfaHostWwns
    Set-PfaIdleTimeout
    Set-PfaInterfaceAddress
    Set-PfaInterfaceAddressAndNetmask
    Set-PfaInterfaceGateway
    Set-PfaInterfaceMtu
    Set-PfaItemFlag
    Set-PfaNtpServers
    Set-PfaPersonality
    Set-PfaPhoneHomeStatus
    Set-PfaProtectionGroupRetention
    Set-PfaProtectionGroupSchedule
    Set-PfaProxy
    Set-PfaRelayHost
    Set-PfaRemoteAssistStatus
    Set-PfaScsiTimeout
    Set-PfaSenderDomain
    Set-PfaSlaveInterfaces
    Set-PfaSnmpManagerAuthPassphrase
    Set-PfaSnmpManagerAuthProtocol
    Set-PfaSnmpManagerCommunity
    Set-PfaSnmpManagerHost
    Set-PfaSnmpManagerPrivacyPassphrase
    Set-PfaSnmpManagerPrivacyProtocol
    Set-PfaSnmpManagerUser
    Set-PfaSnmpManagerVersion
    Set-PfaSyslogServers
    Set-PfaTargetArrays
    Set-PfaTargetCredentials
    Set-PfaVolumesInProtectionGroup
    Test-PfaAlert
    Test-PfaAlerts
    Test-PfaDirectoryService
    Test-PfaSnmpTrap
    Update-PfaItemFlag

Thanks,
barkz

 

  • Thank you for your post.
    Very useful.