RDS Remote Desktop Gateway - Disable UDP Transport settings via PowerShell

Raffaele Vigliotti 26 Reputation points
2021-11-03T20:29:21.987+00:00

I am not able to find the right key in the RemoteDesktop Gateway registry items to disable the UDP Transport Settings

Get-childItem RDS:\GatewayServer | ft -a

Name Type CurrentValue GP PermissibleValues PermissibleOperations ---- ---- ------------ -- ----------------- --------------------- MaxConnections 4294967295 - 0-4294967295 Get-Item, Set-Item MaxConnectionsAllowed 4294967295 - Get-Item SSLBridging 0 - 0, 1, 2 Get-Item, Set-Item CentralCAPEnabled 0 - 0, 1 Get-Item, Set-Item EnableOnlyMessagingCapableClients 0 - 0, 1 Get-Item, Set-Item CAP - Get-Item, Get-ChildItem, New-Item RAP - Get-Item, Get-ChildItem, New-Item GatewayFarm - Get-Item, Get-ChildItem Auditing - Get-Item, Get-ChildItem NPSServers - Get-Item, Get-ChildItem, New-Item SSLCertificate - Get-Item, Get-ChildItem AdminMessageSettings - Get-Item, Get-ChildItem LogonMessageSettings - Get-Item, Get-ChildItem GatewayManagedComputerGroups - Get-Item, Get-ChildItem, New-Item

This is the corresponding flag in the GUI

146310-rd-gateway-enable-udp.png

Does anyone how Can i disable that using PowerShell? Thanks!

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services
0 comments No comments
{count} votes

Accepted answer
  1. Jon Chancellor 76 Reputation points Microsoft Employee
    2021-11-09T15:41:15.247+00:00

    This solution using powershell and CIM tested successfully on a 2019 Server Gateway system. Please give it a try after you have successfully installed the gateway feature.

    $config = Get-CimInstance -ClassName Win32_TSGatewayServerSettings -Namespace "root\cimv2\terminalservices"   
      
    Invoke-CimMethod -MethodName "EnableTransport" -Arguments @{TransportType=[uint16]2;enable=$false} -InputObject $config  
    

    Additional methods for configuration can be found at this link: https://learn.microsoft.com/en-us/windows/win32/termserv/win32-tsgatewayserversettings

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.