Updating WAC Extensions

Scenario

You have installed a new instance of Windows Admin Center (in Gateway mode) and there are a lot of installed Extensions that need updating.

What can you do?

Either select each Extension in the WAC GUI in turn and click ‘Update’, or use the following PowerShell:

#To be run on the WAC Server
#Import the WAC Extensions Module
Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ExtensionTools"

#Get the FQDN name of the WAC Server
$fqdn = ([System.Net.Dns]::GetHostByName($env:computerName)).Hostname

#Get the Extensions that have an available update
$ExtensionsToUpdate = Get-Extension "https://$fqdn" | ? {$_.Status -eq 'Installed' -AND $_.iSLatestVersion -eq $False}

#Iterate through each Extension and update it
$ExtensionsToUpdate | ForEach-Object { #$_.id }
    try { 
        Write-Host "Attempting to update Extension '$($_.id)'"
        Update-Extension https://$fqdn $_.id -ErrorAction STOP | Out-Null
        Write-Host "SUCCESS: '$($_.id)' has been updated"
    } catch { 
        Write-output "FAILED"
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *