Showing posts from April, 2014

Server 2012 R2 - Unable to connect via Remote Desktop connection to Server but Locked out by Firewall

Locked out by Firewall for Remote Desktop connection Server 2012 R2Snookered, I had a 2012 R2 Server operating in a remote data center with a network card which had reverted to Public. 

The Public setting had no rule to permit remote desktop. Remote management using the GUI server manager did not have an option I could find to enable the firewall rule.

THE FIXOn another server, on the same domain 
Right-click and open Powershell as Administrator.

At the Powershell prompt:

# This opens a remote powershell session
PS C:\> Enter-PSSession remoteservername-or-ipaddress

# This creates a rule to permit RDP access
PS C:\> New-NetFirewallRule -Name Custom_Allow_RDP -DisplayName "Custom Allow RDP" -Description "Custom Allow RDP TCP port 3389" -Protocol TCP –LocalPort 3389 -Direction Inbound -Enabled True -Profile Any -Action Allow

# Now connect to the server and deal with the problem at hand
PS C:\> mstsc