FlashArray PowerShell VMware Module

To help our customers I have written a module that includes a lot of the common operations people might need to “connect” PowerCLI to our PowerShell SDK.

The module is called PureStorage.FlashArray.VMware.

The module is designed into four separate modules that are included when you install the main one:

  • PureStorage.FlashArray.VMware.Configuration –this does connection management, host configuration, and generic initial setup.
  • PureStorage.FlashArray.VMware.VMFS–this offers VMFS-related cmdlets
  • PureStorage.FlashArray.VMware.VVol–this offers VVol-related cmdlets
  • PureStorage.FlashArray.VMware.RDM–this offers RDM-related cmdlets

There are two places you can download this. The best option is the PowerShell gallery! This allows you to use install-module to automatically install the module. It requires PowerCLI and the PureStorage PowerShell SDK to be installed, the Pure Storage PowerShell SDK will be automatically installed when you do install-module if it is not already.

The module will help you connect PowerCLI commands (like get-datastore or get-vmhost) to operations you might want to do on the FlashArray. The cmdlets support pipeline input for most variables (datastores, FlashArray connections, ESXi hosts, etc.).

To install:

install-module PureStorage.FlashArray.VMware

To load the module:

import-module PureStorage.FlashArray.VMware

To update:

update-module PureStorage.FlashArray.VMware

Use either get-help or get-command to see the details:

Comment on Versioning

Versions numbering w.x.y.z (for example

  • W is iterated for large updates
  • X is iterated for new cmdlets
  • Y is iterated for new functions to existing cmdlets
  • Z is iterated for bug fixes

Latest version (July 16th, 2019)


new-pfaConnection get-pfaDatastore get-pfaConnectionOfDatastore new-pfaRestSession remove-pfaRestSession new-pfaHostFromVmHost get-pfaHostFromVmHost get-pfaHostGroupfromVcClusternew-pfaHostGroupfromVcCluster set-vmHostPfaiSCSI set-clusterPfaiSCSI new-pfaVolRdm get-pfaVolfromRDM get-pfaConnectionlfromRDM new-pfaVolRdmSnapshot get-pfaVolRDMSnapshot copy-pfaSnapshotToRDM set-pfaVolRDMCapacity remove-pfaVolRDM convert-pfaVolRDMtoVvol get-pfaVolfromVMFS new-pfaVolVmfs add-pfaVolVmfsToCluster set-pfaVolVmfsCapacity get-pfaVolVmfsSnapshot new-pfaVolVmfsSnapshot new-pfaVolVmfsFromSnapshot update-pfaVvolVmVolumeGroup get-vvolUuidFromHardDisk get-pfaVolumeNameFromVvolUuid get-pfaSnapshotsFromVvolHardDisk copy-pfaVvolVmdkToNewVvolVmdk copy-pfaSnapshotToExistingVvolVmdkcopy-pfaSnapshotToNewVvolVmdk copy-pfaVvolVmdkToExistingVvolVmdk new-pfaSnapshotOfVvolVmdkget-vmdkFromWindowsDisk, New-PfaVasaProvider Get-PfaVasaProvider Remove-PfaVasaProviderInstall-PfavSpherePlugin Get-PfavSpherePlugin, Mount-PfaVvolDatastore

"Remember kids, the only difference between Science and screwing around is writing it down"