Skip to content

Installing the Module

Verify that your system has a supported edition and version of PowerShell installed.

For environments connected to the Internet, you can install the module dependencies from the PowerShell Gallery by running the following commands in the PowerShell console:

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module -Name VMware.PowerCLI -MinimumVersion 13.2.1 -Scope AllUsers
Install-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9 -Scope AllUsers
Install-Module -Name PowerVCF -MinimumVersion 2.4.1 -Scope AllUsers
Install-Module -Name PowerValidatedSolutions -MinimumVersion 2.11.1 -Scope AllUsers
Install-Module -Name VMware.CloudFoundation.PasswordManagement -Scope AllUsers

Import the modules before proceeding:

For example:

Import-Module -Name VMware.PowerCLI
Import-Module -Name VMware.vSphere.SsoAdmin
Import-Module -Name PowerVCF
Import-Module -Name PowerValidatedSolutions
Import-Module -Name VMware.CloudFoundation.PasswordManagement

To verify the module dependencies are installed, run the following commands in the PowerShell console.

Example:

Test-VcfPasswordManagementPrereq

For environments disconnected from the Internet (e.g., dark-site, air-gapped), you can save the module dependencies from the PowerShell Gallery by running the following commands in the PowerShell console:

From a system with an Internet connection, save the module dependencies from the PowerShell Gallery by running the following commands in the PowerShell console:

Save-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9 -Path F:\Modules\
Save-Module -Name VMware.PowerCLI -MinimumVersion 13.2.1 -Path F:\Modules
Save-Module -Name PowerVCF -MinimumVersion 2.4.1 -Path F:\Modules\
Save-Module -Name PowerValidatedSolutions -MinimumVersion 2.11.1 -Path F:\Modules\
Save-Module -Name VMware.CloudFoundation.PasswordManagement -Path F:\Modules\

From the system with the Internet connection, copy the module dependencies to a target system by running the following commands in the PowerShell console:

Copy-Item -Path F:\Modules\* -Destination '\\<destination_host>\C$\Program Files\WindowsPowerShell\Modules\' -Recurse

On the target system, import the module dependencies by running the following commands in the PowerShell console:

Import-Module -Name VMware.PowerCLI
Import-Module -Name VMware.vSphere.SsoAdmin
Import-Module -Name PowerVCF
Import-Module -Name PowerValidatedSolutions
Import-Module -Name VMware.CloudFoundation.PasswordManagement

Prerequisite for module install on Linux Machine

mkdir /home/modules

From a system with an Internet connection, save the module dependencies from the PowerShell Gallery by running the following commands in the PowerShell console:

Save-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9  -Path /home/modules
Save-Module -Name VMware.PowerCLI -MinimumVersion 13.2.1 -Path /home/modules
Save-Module -Name PowerVCF -MinimumVersion 2.4.1 -Path /home/modules
Save-Module -Name PowerValidatedSolutions -MinimumVersion 2.11.1 -Path /home/modules
Save-Module -Name VMware.CloudFoundation.PasswordManagement -Path /home/modules

From the system with an Internet connection, copy the module dependencies to a target system by running the following commands in the PowerShell console:

scp -r /home/modules/* username@remote_host:/home/lab/.local/share/powershell/Modules/

On the target system, import the module dependencies by running the following commands in the PowerShell console:

Import-Module -Name VMware.PowerCLI
Import-Module -Name VMware.vSphere.SsoAdmin
Import-Module -Name PowerVCF
Import-Module -Name PowerValidatedSolutions
Import-Module -Name VMware.CloudFoundation.PasswordManagement

  Reference

Once installed, any cmdlets associated with VMware.CloudFoundation.PasswordManagement and the its dependencies will be available for use.

To view the cmdlets for available in the module, run the following command in the PowerShell console.

Get-Command -Module VMware.CloudFoundation.PasswordManagement

To view the help for any cmdlet, run the Get-Help command in the PowerShell console.

For example:

Get-Help -Name Invoke-PasswordPolicyManager
Get-Help -Name Invoke-PasswordPolicyManager -Examples
Get-Help -Name Invoke-PasswordPolicyManager -Full