About
Code Shipping - (Module|Component) in Powershell
Module are installed with a Powershell - Package Provider
Articles Related
Management
Install
- a package provider may be mandatory and already installed
Example install the credential manager module
$CREDENTIAL_MODULE_NAME='CredentialManager'
$CREDENTIAL_MANAGER = Get-Module -ListAvailable -Name $CREDENTIAL_MODULE_NAME 2>$null
if ($CREDENTIAL_MANAGER -eq $null){
Write-Error "Credential Manager ($CREDENTIAL_MODULE_NAME) was not found. Installing it"
Install-Module -Name $CREDENTIAL_MODULE_NAME
} else {
Write-Host "Credential Manager ($CREDENTIAL_MODULE_NAME) is already installed."
}
Get
listavailable is important !
Get-Module -Name ModuleName -ListAvailable
Version
(Get-Module -Name ModuleName -ListAvailable).Version