Update PowerShell modules

There are many wonderful PowerShell modules available and published at PowerShell Gallery, but as time passes many modules will receive new versions with bug fixes, features and help updates. The function Invoke-ModuleUpdate aims to hopefully solve the problem with new available versions by querying the PSRepository for each module to find if any new version is available, and later update that module if the parameter -Update was specified.

Heres an example when running Invoke-ModuleUpdate just to query the repository for a new version.

If you want to update modules specify the switch parameter -Update

The default behavior of Invoke-ModuleUpdate without any parameters specified is to query the repository for a new version for all installed modules.

If you wan’t you can run the function on a weekly basis simply by adding a Schedued Job.

Installation

The Invoke-ModuleUpdate is a function available in the Omnicit PowerShell Toolbox.
If you have the PowerShellGet module installed you can enter the following command:

Check out the GitHub page for more information and available cmdlets.

Leave a Comment

Your email address will not be published. Required fields are marked *