Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Run the following commands to remove any previous versions of installed PowerShell modules: 

This will perform the following actions for each PowerShell module:

  • Remove the module from the current session if loaded
  • Update the module if installed and install the module if not
  • Uninstall any previous versions of the module
  • Import the module 
$InstalledModules = Get-InstalledModule; ForEach ($Module in $InstalledModules) { Get-InstalledModule -Name $Module.Name -AllVersions | Where-Object { $_.Version -ne $Module.Version } | Uninstall-Module }
  • No labels