I see a fair amount of requests around how to do different things with VMware PowerCLI and the Pure Storage PowerShell SDK. How do I correlate a VMFS to a volume? How do I create a new VMFS? How do I expand? Etc.
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 Cody.PureStorage.FlashArray.VMware.
There are a couple of 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.
You can also manually get it here:
If you do not have internet access on the machine, you can manually download it from my GitHub:
The cmdlet 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.).
I will be working on adding more and more to this!
Use either get-help or get-command to see the details:
As new versions come out, just simply run:
The version 188.8.131.52 has the following cmdlets:
|get-faVolumeNameFromVvolUuid||Returns a FlashArray volume object from a entered VVol UUID|
|new-pureflasharrayRestSession||Creates a REST session to a FlashArray. Allows you to make REST calls to the FlashArray that the PowerShell SDK does not yet natively support.|
|remove-pureflasharrayRestSession||Removes a FlashArray session.|
|get-vmdkFromWindowsDisk||Takes in a drive letter and returns the corresponding virtual disk object of the Windows VM.|
|new-faHostFromVmHost||Creates a FlashArray host from the initiators of a given ESXi host.|
|get-faHostFromVmHost||Returns the corresponding FlashArray host object of an entered ESXi host.|
|get-faHostGroupfromVcCluster||Returns the corresponding FlashArray host group object of an entered ESXi host cluster.|
|new-faHostGroupfromVcCluster||Creates a FlashArray host group from the initiators of a given ESXi host cluster.|
|set-vmHostPureFaiSCSI||Configures iSCSI targets and best practices of a FlashArray on an ESXi host.|
|set-clusterPureFAiSCSI||Configures iSCSI targets and best practices of a FlashArray on an ESXi host cluster.|
|get-faVolfromVMFS||Returns the FlashArray volume that hosts a VMFS datastore.|
|new-faVolVmfs||Creates a new FlashArray volume and presents it to a VMware cluster and formats it with VMFS|
|add-faVolVmfsToCluster||Adds an existing VMFS to another VMware cluster.|
|set-faVolVmfsCapacity||Resizes a FlashArray volume and grows the VMFS on it.|