Update Manually Installed PowerShell Modules from the PowerShell Gallery

There are PowerShell modules that ship with Windows 10 that weren’t installed from the PowerShell Gallery using PowerShellGet so they can’t be updated using the Update-Module cmdlet. This also applies for any modules that you’ve installed manually yourself.

The following PowerShell script retrieves a list of the most recent version of the modules in the all users path for PowerShell modules. It determines which ones weren’t installed using PowerShellGet based on the hidden xml file that would exist in the module directory and then it determines if a newer version exists in one of the PowerShell Galleries that’s registered on your computer:


Installing the updated version is as simple as piping the previous results to ForEach-Object and nesting Install-Module with the Force parameter inside of it:



Leave a Reply

%d bloggers like this: