Versions Compared

Key

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

...

Run the following commands to locate any installed instance of the active PowerShell modules: module

Code Block
languagepowershell
$ModuleIsActive$ModuleIsInstalled = Get-Module -Name $PowerShellModuleName -ListAvailable

Run the following commands to locate any active instance of the installed PowerShell modules module:

$ModuleIsInstalled
Code Block
languagepowershell
$ModuleIsActive = Get-Module -Name $PowerShellModuleName -ListAvailable

Run the following commands to unload any active instance of the PowerShell modulesmodule

Code Block
languagepowershell
If ($ModuleIsActive) { Remove-Module -Name $PowerShellModuleName -Force }

Run the following commands to update or install the latest version of the PowerShell modules module from the PSGallery: 

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

...