Windows Admin Center - Installing extensions using 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,
I find it quite time consuming to have to install Windows Admin Center extensions from the interface and Powershell does it easily. I use this script when demonstrating Windows Admin Center, it allows me to add a list of extensions quickly.
# WAC server name.$ServerName = 'srv1'
# Import the WAC module (present on the workstation with WAC).# This may require remote Powershell# Enter-PSSession -ComputerName $ServerNameImport-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ExtensionTools"
# WAC address$WAC = "https://$ServerName/"
# List of extensions (to be adapted to your needs)$extensions = 'microsoft.security','msft.iis.iis-management','msft.sme.active-directory','msft.sme.cluster-creation','msft.sme.containers','msft.sme.dhcp','msft.sme.dns','msft.sme.failover-cluster','msft.sme.file-explorer','msft.sme.hyperv','msft.sme.software-defined-data-center','msft.sme.storage-migration','msft.sme.storage-replica','msft.sme.system-insights','msft.sme.windows-update','msft.sdn.acls','msft.sdn.logical-network','msft.sdn.vgw-network-connection','msft.sme.apps-and-features','msft.sme.certificate-manager','msft.sme.dev-guide','msft.sme.device-manager','msft.sme.event-viewer','msft.sme.firewall','msft.sme.local-users-groups','msft.sme.monitor','msft.sme.network-controller','msft.sme.network-settings','msft.sme.packetmon','msft.sme.powershell-console','msft.sme.process-viewer','msft.sme.registry-editor','msft.sme.remote-desktop','msft.sme.roles-features','msft.sme.scheduled-tasks','msft.sme.sdn-monitoring','msft.sme.service-viewer','msft.sme.server-manager','msft.sme.storage'
# List the extensions (the ID is the value to be reused to add your extension to my code)Get-Extension $WAC | Select-Object -Property id, description
# List uninstalled extensionsGet-Extension $WAC | Where-Object {$_.status -eq 'Available' } | Select-Object -Property id, description# Note: Partially functional, old versions of modules are sometimes listed here# Example: msft.sme.hyperv version 2.59.0 is listed as 'Available' even though I have version 2.65 installed.
# Install extensions# Note that I don't bother to check whether the extensions are installed# As the list of uninstalled/installed extensions doesn't seem reliable, I'll let the installation do the thinking for me$extensions | ForEach-Object -Process { Install-Extension -GatewayEndpoint $wac -ExtensionId $_ }
Related links
Windows Admin Center - Installing extensions using Powershell
I find it quite time-consuming to have to install Windows Admin Center extensions from the interface and Powershell does it easilyWindows Admin Center - Updating extensions with Powershell
The Windows Admin Center extensions should update automatically but this obviously doesn't work properly for me, so I use a Powershell script which is also used in my training courses for WAC demonstrationsImproving the usability of Powershell on the command line with PSReadLine
The PSReadLine PowerShell module replaces the command line experience for Powershell 3 and aboveViewing other types of file containing simple text in Windows
It is possible to view other types of file containing simple text, such as .ps1, .psm1, .psd1, .twig, .gcode... in Windows File ExplorerPowershell - Testing network connectivity and port accessibility
Testing network connectivity and port accessibility with PowershellPowershell - Display network connections (equivalent to netstat)
Display network connections (listening ports, active connections...)
Follow me on
Support me
Last content
Powershell - Testing network connectivity and port accessibility
Powershell - Display network connections (equivalent to netstat)
Powershell - Testing name resolution (equivalent to nslookup)
Powershell - View and manage DNS configuration of network interfaces
Powershell - Managing IP configuration of network interfaces
Powershell - Managing the status and configuration of network interfaces
Powershell and the Left Hand Side
Powershell - Managing disks, partitions and volumes