Skip to content

Installing the Module

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

Install the PowerShell module dependencies from the PowerShell Gallery by running the following commands:

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module -Name VMware.PowerCLI -MinimumVersion 13.1.0
Install-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9
Install-Module -Name PowerVCF -MinimumVersion 2.4.0
Install-Module -Name PowerValidatedSolutions -MinimumVersion 2.7.0
Install-Module -Name VMware.CloudFoundation.PasswordManagement

If using PowerShell Core, 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

From Air-gapped Machine

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

Save Modules module dependencies from the PowerShell Gallery on a non air-gapped machine by running the following commands:

Save-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9  -Path F:\Module\
Save-Module -Name VMware.PowerCLI -MinimumVersion 13.0.0 -Path F:\Module\
Save-Module -Name PowerVCF -MinimumVersion 2.4.0 -Path F:\Module\
Save-Module -Name PowerValidatedSolutions -MinimumVersion 2.6.0 -Path F:\Module\
Save-Module -Name VMware.CloudFoundation.PasswordManagement -Path F:\Module\

Copy the PowerShell Modules module dependencies from the Local Machine to air-gapped facing machine by running the following commands:

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

Import the PowerShell Modules module dependencies from the air-gapped machine by running the following commands:

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

Save Modules module dependencies from the PowerShell Gallery on a non air-gapped machine by running the following commands:

Save-Module -Name VMware.vSphere.SsoAdmin -MinimumVersion 1.3.9  -Path /home/modules
Save-Module -Name VMware.PowerCLI -MinimumVersion 13.0.0 -Path /home/modules
Save-Module -Name PowerVCF -MinimumVersion 2.4.0 -Path /home/modules
Save-Module -Name PowerValidatedSolutions -MinimumVersion 2.6.0 -Path /home/modules
Save-Module -Name VMware.CloudFoundation.PasswordManagement -Path /home/modules

Copy the PowerShell Modules module dependencies from the Local Machine to air-gapped facing machine by running the following commands:

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

Import the PowerShell Modules module dependencies from the air-gapped machine by running the following commands in PowerShell:

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

Last update: 2023-11-01