PowerShell script to change the default RDP port on Windows Server, update firewall rules, and enable RDP if disabled. Ideal for hardening remote access. Compatible with Windows Server 2012, 2016, 2019, and 2022.
windows security script powershell firewall sysadmin windows-server rdp remote-desktop hosteons rdp-port
-
Updated
May 30, 2025 - PowerShell