question

RaffaeleVigliotti-6681 avatar image
0 Votes"
RaffaeleVigliotti-6681 asked JonChancellor-8060 answered

RDS Remote Desktop Gateway - Disable UDP Transport settings via PowerShell

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!

remote-desktop-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JonChancellor-8060 avatar image
0 Votes"
JonChancellor-8060 answered

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://docs.microsoft.com/en-us/windows/win32/termserv/win32-tsgatewayserversettings

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.