Use PowerShell to manage Windows Admin Center settings

If you have a large organization with multiple Windows Admin Center servers, you can use PowerShell to configure the list of connections and extensions on multiple servers at a time.

Use PowerShell to import or export your connections (with tags)

# Load the module
Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ConnectionTools"
# Available cmdlets: Export-Connection, Import-Connection

# Export connections (including tags) to a .csv file
Export-Connection "" -fileName "WAC-connections.csv"
# Import connections (including tags) from a .csv file
Import-Connection "" -fileName "WAC-connections.csv"
# Import connections (including tags) from .csv files, and remove any connections that are not explicitly in the imported file using the -prune switch parameter 
Import-Connection "" -fileName "WAC-connections.csv" -prune

CSV file format for importing connections

The format of the CSV file starts with the four headings "name","type","tags","groupId", followed by each connection on a new line.

name is the FQDN of the connection

type is the connection type. For the default connections included with Windows Admin Center, you will use one of the following:

Connection type Connection string
Windows Server msft.sme.connection-type.server
Failover Cluster msft.sme.connection-type.cluster

tags are pipe-separated.

groupId is used for shared connections. Use the value global in this column to make this a shared connection.


Modifying the shared connections is limited to gateway administrators - any user can use PowerShell to modify their personal connection list.

Example CSV file for importing connections


Import RDCman connections

Use the script below to export saved connections in RDCman to a file. You can then import the file into Windows Admin Center, maintaining your RDCMan grouping hierarchy using tags. Try it out!

  1. Copy and paste the code below into your PowerShell session:

    #Helper function for RdgToWacCsv
    function AddServers {
     param (
     [Parameter(Mandatory = $true)]
     [Parameter(Mandatory = $true)]
     if ($node.LocalName -eq 'server') {
         $serverName = $
         $tagString = $tags -join "|"
         Add-Content -Path $csvPath -Value ('"'+ $serverName + '","msft.sme.connection-type.server","'+ $tagString +'"')
     elseif ($node.LocalName -eq 'group' -or $node.LocalName -eq 'file') {
         $groupName = $
         $currNode = $
         while ($currNode) {
             AddServers -node $currNode -tags $tags -csvPath $csvPath
             $currNode = $currNode.NextSibling
     else {
         # Node type isn't relevant to tagging or adding connections in WAC
    Convert an .rdg file from Remote Desktop Connection Manager into a .csv that can be imported into Windows Admin Center, maintaining groups via server tags. This will not modify the existing .rdg file and will create a new .csv file
     This converts an .rdg file into a .csv that can be imported into Windows Admin Center.
     .PARAMETER RDGfilepath
     The path of the .rdg file to be converted. This file will not be modified, only read.
     .PARAMETER CSVdirectory
     Optional. The directory you wish to export the new .csv file. If not provided, the new file is created in the same directory as the .rdg file.
     C:\PS> RdgToWacCsv -RDGfilepath "rdcmangroup.rdg"
    function RdgToWacCsv {
         [Parameter(Mandatory = $true)]
         [Parameter(Mandatory = $false)]
     [xml]$RDGfile = Get-Content -Path $RDGfilepath
     $node = $RDGfile.RDCMan.file
     if (!$CSVdirectory){
         $csvPath = [System.IO.Path]::GetDirectoryName($RDGfilepath) + [System.IO.Path]::GetFileNameWithoutExtension($RDGfilepath) + "_WAC.csv"
     } else {
         $csvPath = $CSVdirectory + [System.IO.Path]::GetFileNameWithoutExtension($RDGfilepath) + "_WAC.csv"
     New-item -Path $csvPath
     Add-Content -Path $csvPath -Value '"name","type","tags"'
     AddServers -node $node -csvPath $csvPath
     Write-Host "Converted $RDGfilepath `nOutput: $csvPath"
  2. To create a .CSV file, run the following command:

    RdgToWacCsv -RDGfilepath "path\to\myRDCManfile.rdg"
  3. Import the resulting .CSV file in to Windows Admin Center, and all your RDCMan grouping hierarchy will be represented by tags in the connection list. For details, see Use PowerShell to import or export your connections (with tags).

Manage Windows Admin Center extensions with PowerShell

# Add the module to the current session
Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ExtensionTools"
# Available cmdlets: Get-Feed, Add-Feed, Remove-Feed, Get-Extension, Install-Extension, Uninstall-Extension, Update-Extension

# List feeds
Get-Feed ""

# Add a new extension feed
Add-Feed -GatewayEndpoint "" -Feed "\\WAC\our-private-extensions"

# Remove an extension feed
Remove-Feed -GatewayEndpoint "" -Feed "\\WAC\our-private-extensions"

# List all extensions
Get-Extension ""

# Install an extension (locate the latest version from all feeds and install it)
Install-Extension -GatewayEndpoint "" "msft.sme.containers"

# Install an extension (latest version from a specific feed, if the feed is not present, it will be added)
Install-Extension -GatewayEndpoint "" "msft.sme.containers" -Feed ""

# Install an extension (install a specific version)
Install-Extension "" "msft.sme.certificate-manager" "0.133.0"

# Uninstall-Extension
Uninstall-Extension "" "msft.sme.containers"

# Update-Extension
Update-Extension "" "msft.sme.containers"


You must be gateway administrator to modify Windows Admin Center extensions with PowerShell.

Additional References