wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="CertificateSHA1Hash"
You can get the Certificate SHA1 Hash by using openssl...
Encapsulates RDP in HTTPS packets listens on port 443 (for TCP) and port 3391 (for UDP)
Ports can be changed via RD Gateway Manager utility
Right-click the RD Gateway server name in the navigation pane and select Properties.
Select the Transport Settings tab.
Modify the HTTP and/or UDP port number.
Add firewall exceptions for TCP and UDP for the custom port
When you connect from a client, you need to add the custom port to the end of the gateway server name, preceded by a colon (:)...
Start Registry Editor.
Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\
Right click on the one called PortNumber
On the Edit menu, click Modify, and then click Decimal.
Type the new port number, and then click OK.
Quit Registry Editor.
Restart the computer.
...
Launch Command Prompt as Admin
To get the session ID for users, use the "qwinsta" command
To get connected use "mstsc.exe /shadow:sessionID /control /noConsentPrompt"
If you do not include /noConsentPrompt the user will be prompted to click on that says "Your username is requested to connect your session remotely. Do you accept the request? Yes or No"...