Install PowerShell SDK using PowerShell Gallery

Starting with the PowerShell SDK 1.5.5.x the module can be installed from the PowerShell Gallery. Installing from the PowerShell Gallery allows for quicker updates, no installation package downloads (i.e MSI) and can be deployed across a data center quickly to individual server nodes.

Starting with Windows PowerShell 5.0 the PowerShellGet module was included. The PowerShellGet module provides the integration with the PowerShell Gallery for remotely installing additional modules.

Steps

Visit Getting Started with the PowerShell Gallery to understand the requirements and setup required for using PowerShellGet. After configuring Windows PowerShell to support installing from the PowerShell Gallery we are ready to proceed with setup of the Pure Storage PowerShell SDK.

Open a Windows PowerShell with Run as Administrator.

To understand the different cmdlets that are part of PowerShellGet run the below command.

Once the above cmdlet is executed you will see the below warning if the PowerShell Gallery (i.e. PSGallery) has not been setup as a Trusted Repository.

PS C:\> Install-Module -Name PureStoragePowerShellSDK
Untrusted repository
You are installing the modules from an untrusted repository. If you
trust this repository, change its InstallationPolicy value by running
the Set-PSRepository cmdlet. Are you sure you want to install the
modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "N"):

Choose [N] No to exit and set the PSGallery repository to Trusted in order to avoid this issue in the future.

Re-run the below command to install. Depending on your connection the download and installation could take a moment. When the installation starts a Windows PowerShell status notification will display in the session window.

Install-Module -Name PureStoragePowerShellSDK

After installing the SDK check that it was installed using the below command. This will return a list of all available scripts and binaries.