...
The PowerShellModuleName variable must already be defined or one of the following values must be set:
...
Run the following commands to locate the loaded active PowerShell modules:
Code Block | ||
---|---|---|
| ||
$Loaded$ModuleIsActive = Get-Module -Name $PowerShellModuleName |
Run the following commands to locate the installed PowerShell modules
Code Block |
---|
$Installed$ModuleIsInstalled = Get-Module -Name $PowerShellModuleName -ListAvailable |
...
Code Block | ||
---|---|---|
| ||
If ($Loaded$ModuleIsActive) { Remove-Module -Name $PowerShellModuleName -Force } |
...
Code Block | ||
---|---|---|
| ||
If ($Installed$ModuleIsInstalled) { Update-Module -Name $PowerShellModuleName } Else { Install-Module -Name $PowerShellModuleName } |
...