Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name "PortNumber" -Value 49281
Remove-NetFirewallRule -DisplayName "RDP49281" -ErrorAction SilentlyContinue
New-NetFirewallRule -DisplayName "RDP49281" -Direction Inbound -Protocol TCP -LocalPort 49281 -Action Allow -Profile Any
taskkill /F /FI "SERVICES eq TermService"
Start-Service TermService