Updates all locally installed PowerShell modules to the latest versions available on PSGallery.
- Automatically updates
PackageManagementandPowerShellGetprerequisites before processing other modules. - Installs to CurrentUser scope by default — no admin required.
- Optional
-AllUsersswitch for system-wide installs (requires elevation). - Displays a formatted list of all modules with current vs. available versions.
- Falls back to uninstall/reinstall if a standard update fails.
- Excludes the
AzandMicrosoft.Graphmeta-modules (to avoid reinstalling all submodules). Individual submodules (e.g.,Az.Accounts,Microsoft.Graph.Users) are updated individually.
Install-Module -Name 'Update-InstalledModule'# Update all modules (CurrentUser scope)
Update-InstalledModule
# Update all modules (AllUsers scope, requires admin)
Update-InstalledModule -AllUsers
