PowerShell module installation from PowerShell gallery

This section provides the details and instructions on how to install the Dell EMC PowerShell modules from Microsoft PowerShell gallery.

The PowerShell Gallery (https://www.powershellgallery.com/) is the central repository for PowerShell content. It is a package repository containing scripts, modules,and DSC resources. The package includes PowerShell modules containing PowerShell commands. The cmdlets in the PowerShellGet module are used to install packages from the PowerShell Gallery. For more information on PowerShell gallery, see Getting Started with the PowerShell Gallery. You can also see PowerShell Gallery on how to prepare your system for installation of modules from PowerShell Gallery. Refer to PowerShell gallery for latest versions of PowerShell modules each storage platform.

Installing PowerShell module

Prerequisites

The Windows PowerShell version must be 5.1 or later.

  • To check if PowerShell has old version on Windows 2012 server, run Import-Module -Name <ModuleName> command

    In case of an old version of PowerShell, Import-Module will fail with error message. For example C:\Users\Administrator\Documents\WindowsPowerShell\Modules\Dell.[ModuleName]\1.0.0.0\Dell.[ModuleName].psd1. The following message is displayed: The version of Windows PowerShell on this computer is ‘4.0’. The module ‘C:\Users\Administrator\Documents\WindowsPowerShell\Modules\Dell.[ModuleName]\1.0.0.0\Dell.[ModuleName].psd1’ requires a minimum Windows PowerShell version of ‘5.1’ to run, if old version of PowerShell is installed.

  • To check the PowerShell version, use: $PSVersionTable in PowerShell- which gives PowerShell version installed and current PowerShell session information.

  • The .Net Framework version must be 4.8

  • You must save and import all Unisphere server certificates

PowerShell Gallery requires TLS 1.2. To use TLS 1.2, enter the following command: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Installation Steps

  1. To install the module for all users, start a Windows PowerShell terminal session with Administrator privileges. Enter the following command: Install-Module -Name Dell.[ModuleName]. ModuleName can be PowerStore, PowerMax or Unity. Refer to PowerShell gallery for more information.

    NOTE: If there are commands that have the same names with the commands in the Dell.[ModuleName] module, UseAllowClobber parameter to use the commands from Dell.ModuleName module. For more information on the use of AllowClobber, see https://docs.microsoft.com/en-us/powershell/module/PowerShellGet/Install-Module?view=powershell-5.1.2.

  2. To install the module for a local user, start a Windows PowerShell terminal session as non-admin user and use the parameter-Scope CurrentUser. Enter the following command: Install-Module -Name Dell.[ModuleName] -Scope CurrentUser

  3. Once module is installed, import the module into the current PowerShell session by running Import-Module -Name Dell.[ModuleName]. This will enable users to start running PowerShell cmdlets that are part of the module.

Once the PowerShell module has been installed make sure to import certificate for the storage arrays before attempting to use the module. Refer to “Importing array certificates section” for more details.