Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## update Azure PowerShell modules that have newer versions available. Run elevated since uses -Scope AllUsers
- ## to just show what modules are not at the latest version, delete the code from "| Where"
- Get-Module -ListAvailable az.*|sort name,version|group Name|select Name,@{n='LatestInstalled';e={$_.group[-1].version}},@{n='LatestAvailable';e={$script:latest = (find-module -Name $_.Name).Version;$script:latest}},@{n='UpdateAvailable';e={$script:latest -gt $_.group[-1].version}}|Where UpdateAvailable|% { $_.Name ; Update-module -Name $_.Name -Scope AllUsers -Force }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement