[Error code: 0x5] There was an error opening the Windows Firewall

Confirmed OS environment
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2016
  • Windows Server 2019

1. Symptom

Error occurs when you open Windows Firewall with Advanced Security.

There was an error opening the Windows Defender Firewall with Advanced Security snap-in.
You do not have the correct permission to open the Windows Defender Firewall with Advanced Security console. You must be a member of the Administrators group or the Network Operators group to perform this task. For more information, contact your system administrator. Error code: 0x5.

Windows Defender Firewall with Advanced Security on Local Computer

2. Cause & Resolution

There are two possible causes.

Cause 1. You don’t have the correct permission

As stated in the error message this issue may occur when you don’t have the correct permission to open ” the Windows Firewall with Advanced Security” console. Please make sure that the user trying to open firewall belongs to one of the following group.

  • Administrators
  • Network Configuration Operators

Cause 2. MpsSvc doesn’t have the permission to access to Firewall Policy

This is issue also may occur when Windows Firewall Service doesn’t have the permission to access to Firewall Policy.

Resolution

  1. Open Registry Editor.
  2. Open the following registry key:
    HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy
  3. Right-click on “FirewallPolicy” and select “Permissions”

4. Check if MpsSvc exists. If it not exists click “Add”.

5. Type NT Service\MpsSvc and click “OK”.

6. Click “Apply” and then click “Advanced”.

7. Select “mpssvc” and then click “Edit”.

8. Click “Show advanced permission”.

9. Select permissions as shown below and click “OK”.

10. Click “OK”.

11. Click “OK”.

12. Confirm that you can open the firewall console without the error.

End.

Comments

Copied title and URL