Windows 2022
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber
Windows 2012
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WinStation\RDPTcp\PortNumber
Windows XP
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber