SDK Version 1 Installation

Microsoft Platform Guide

Audience
Public
Source Type
Documentation

Installation Steps

  1. 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 Everpure PowerShell SDK.
  2. Open a Windows PowerShell with Run as Administrator.
  3. Install the Everpure PowerShell SDK using the Install -Module cmdlet. The latest version of the package is installed by default.

Install-Module -Name PureStoragePowerShellSDK
Note:

Please note the name of the module is PureStoragePowerShellSDK.

  1. 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"):
    
  2. Choose [N] No to exit and set the PSGallery repository to Trusted in order to avoid this issue in the future.
    
    PS C:\> Get-PSRepository
    
    Name                      InstallationPolicy   SourceLocation
    ----                      ------------------   --------------
    PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2/
    
    PS C:\> Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
    PS C:\> Get-PSRepository
    
    Name                      InstallationPolicy   SourceLocation
    ----                      ------------------   --------------
    PSGallery                 Trusted              https://www.powershellgallery.com/api/v2/
    
    PS C:\>
    
  3. Re-run the below command to install. Depending on your connection speed, 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
Note:

If a previous version of the PowerShell SDK has been installed via the PowerShell Gallery, use the cmdlet Update-Module -Name PureStoragePowerShellSDK to get the latest version.

  1. After installing the SDK, check that it was installed using the command below. This will return a list of all available scripts and binaries.
    
    PS C:\> Get-Module -ListAvailable
    
        Directory: C:\Program Files\WindowsPowerShell\Modules
        
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
    Script     1.2        PSReadline                          {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remove-...
    Binary     1.6.6.0    PureStoragePowerShellSDK            {Disable-PfaAlert, Enable-PfaAlert, Get-PfaAlert, Get-PfaAlerts...}
    
  2. After installation has completed and verified, the PowerShell SDK is ready for use. To see what cmdlets are available, use the command below:
    
    PS C:\> Get-Command -Module PureStoragePowerShellSDK | more
    CommandType     Name                                               Version      Source
    -----------     ----                                               -------      ------
    Cmdlet          Add-PfaHostGroupsToProtectionGroup                 1.17.3.0     PureStoragePowerShellSDK
    Cmdlet          Add-PfaHostIqns                                    1.17.3.0     PureStoragePowerShellSDK
    Cmdlet          Add-PfaHosts                                       1.17.3.0     PureStoragePowerShellSDK
    Cmdlet          Add-PfaHostsToProtectionGroup                      1.17.3.0     PureStoragePowerShellSDK
    Cmdlet          Add-PfaHostWwns                                    1.17.3.0     PureStoragePowerShellSDK
    Cmdlet          Add-PfaSlaveInterfaces                             1.17.3.0     PureStoragePowerShellSDK
    Cmdlet          Add-PfaTargetArrays                                1.17.3.0     PureStoragePowerShellSDK
    -- More  --