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 *


Fatal error: Uncaught RuntimeException: Error saving action: Error saving action: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Unclosed quotation mark after the character string 'O:30:"ActionScheduler_SimpleSchedule":2:{s:22:"'. in D:\home\site\wwwroot\wp-content\plugins\wpforms-lite\vendor\woocommerce\action-scheduler\classes\migration\ActionScheduler_DBStoreMigrator.php:44 Stack trace: #0 D:\home\site\wwwroot\wp-content\plugins\wpforms-lite\vendor\woocommerce\action-scheduler\classes\data-stores\ActionScheduler_HybridStore.php(225): ActionScheduler_DBStoreMigrator->save_action(Object(ActionScheduler_Action), NULL) #1 D:\home\site\wwwroot\wp-content\plugins\wpforms-lite\vendor\woocommerce\action-scheduler\classes\ActionScheduler_ActionFactory.php(177): ActionScheduler_HybridStore->save_action(Object(ActionScheduler_Action)) #2 D:\home\site\wwwroot\wp-content\plugins\wpforms-lite\vendor\woocommerce\action-scheduler\classes\ActionScheduler_ActionFactory.php(84): ActionScheduler_ActionFactory->store(Object(ActionSc in D:\home\site\wwwroot\wp-content\plugins\wpforms-lite\vendor\woocommerce\action-scheduler\classes\migration\ActionScheduler_DBStoreMigrator.php on line 44