Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
languagepowershell
$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
languagepowershell
If ($Loaded$ModuleIsActive) { Remove-Module -Name $PowerShellModuleName -Force }

...

Code Block
languagepowershell
If ($Installed$ModuleIsInstalled) { Update-Module -Name $PowerShellModuleName } Else { Install-Module -Name $PowerShellModuleName }

...