Reputation: 5596
I have disabled the remote desktop firewall rule in a Windows Azure virtual machine.As you would expect, I can no longer remote desktop in to the server.
Does anyone know if it is possible to re-enable the Remote Desktop Windows firewall rule?
What I have tried
As a long shot, I have downloaded the Windows Azure CLI but can't see anything in there that would do it but have not found anything.
I have also tried to execute the following command against the MSSQL server:
EXEC xp_cmdshell 'netsh advfirewall firewall set rule group="remote desktop" new enable=Yes';
GO
I am getting the following message from the query:
The requested operation requires elevation (Run as administrator).
Please tell me I don't have to re-create the site (which is backed up).
Upvotes: 0
Views: 5988
Reputation: 188
If you're using a VM inside a resource group with the new azure portal, you can do this:
Upvotes: 4
Reputation: 5596
It turns out that all I needed to do was to PowerShell into the Azure VM.
Steps:
https://yourdomaing.cloudapp.net:12345
(where :12345 is the port that PowerShell uses).Enter-PSSession -ComputerName yourdomain.cloudapp.net -Port 5986 -Credential YourUserName -UseSSL
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
and exited the PowerShell session and was able to remotely connect to my machine.Upvotes: 2