Windows Admin Center - Updating extensions with Powershell

To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!

Hello,

The Windows Admin Center extensions should update automatically but this obviously doesn’t work properly with me so I use a Powershell script which is also used in my training courses for WAC demonstrations.

# WAC server name.
$ServerName = 'srv1'
# Import the WAC module (present on the workstation with WAC).
# This may require remote Powershell
# Enter-PSSession -ComputerName $ServerName
Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ExtensionTools"
# WAC address
$WAC = "https://$ServerName/"
# List installed extensions that do not have the latest version
$extensions = Get-Extension $WAC | Where-Object {($_.isLatestVersion -match "false") -and ($_.status -eq "installed") } | Select-Object -ExpandProperty id
# Update extensions
ForEach ($extension in $extensions)
{
Update-Extension $WAC -ExtensionId $extension -Verbose
}

Related links