Microsoft makes it easy to make sure that your PowerShellGet installed PowerShell modules are up-to-date with the latest version. Simply rerun the install-module command you used when installing the specific module originally. This causes PowerShell to go to the PowerShell gallery and if a newer version of the specific module is available, it will install it over top the one currently installed.
As an example, here’s how to update the AzureAD module:
Of course, this is the method to use to also install the AzureAD module if it wasn’t installed already.
Unfortunately, Microsoft currently provides no auto-update method for PowerShell modules like it does for the Windows operating system through Windows Update services. You’ll just have to remember to perform this manual procedure periodically. Or, as a best practice – each time you use a specific module just check for updates first.
Looking for an awesome, no-nonsense technical conference for IT Pros, Developers, and DevOps? IT/Dev Connections kicks off in San Francisco in 2017!