How to keep your Powershell modules up-to-date

Powershell modules are loadable extensions. Most non-standard modules are installed in:

C:\Program Files\WindowsPowerShell\Modules

You will find all non-standard modules installed on the system in separate directories. It is best not to change anything in there directly, unless you know what you are doing. There are Powershell commands to list and update modules in a safe way.

To get an overview of all installed modules:

Get-InstalledModule

To get details of a single module, for example AzureAD:

Get-InstalledModule -Name AzureAd | fl

To search for the most recent version in the online repository:

Find-Module -Name AzureAD

To update the installed module:

Update-Module -Name AzureAD

To remove and delete an installed module from the local system:

Uninstall-Module -Name AzureAD -Force

Don’t forget that to activate or start using your new or updated modules, you need to close your Powershell window and restart it.