Lost RDP access: Is there a powershell command to modify this value on Azure VM: Windows Firewall Windows Firewall Public Settings Apply local connection security rules RRS feed

  • Question

  • I was following a security recommendation to modify the value to Yes and seem to have totally removed my rdp access to my VM. I made the change under firewalll properties on the VM. 

    Action: Windows Firewall Windows Firewall Public Settings Apply local connection security rules set it to No

    The value was unselected and I need a way to turn it back to unselected or "Yes" please.

    I can access powershell commands and was wondering if there was a command I could run to set this value back to No? 

    I have done some digging but can't quite work it out. 

    I wasn't quite sure whether this was even the 

    Get-ItemProperty -Path HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile\



    Friday, October 11, 2019 9:44 AM

All replies

  • HI,

    Please post the solution here for the benefit of the community.

    One option is to disable the firewall using the below command 

    Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

    And then login to the machine and revert the change you have done.

    After that you can enable the firewall again.

    Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True

    Friday, October 11, 2019 10:55 AM
  • Hi ScubaJames,

    Did the above reply  helped you to solve your problem?

    For the benefit of the community, Please click on "mark as answer" for the reply which helped you to solve your problem.

    Thursday, October 17, 2019 12:29 PM
  • Hello,

    Any update on the issue?

    Just checking in if you got chance to check the previous response from Jakaruna. 

    If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.


    Tuesday, October 22, 2019 10:37 AM