Disable Windows firewall on 2k19.

Doria 1,246 Reputation points
2020-08-11T15:56:52.393+00:00

Hi everyone!

I am trying to disable the firewall service on w2k19 but I get the following error message below. Why?
16968-untitled.png

Thanks.

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,790 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sunny Qi 11,051 Reputation points Microsoft Vendor
    2020-08-12T03:07:32.023+00:00

    Hi,

    Thanks for DSPatrick's answer.

    Please make sure that you run cmd.exe as administrator to execute command "sc config MpsSvc start= disabled"

    If "Access is denied" error still occurred, may I know whether you want to disable Windows Defender Firewall or want to disable Windows Defender Firewall services?

    17083-image-2.jpg
    17084-image-1.jpg

    To disable Windows Defender Firewall as image 1:

    You can try DSPatrick's suggestion through Powershell with administrator privilege or you can execute the following command through cmd.exe with administrator privilege.

    Disable Guest or public networks:

    netsh firewall set opmode disable

    If your computer is a domain member you must to use this command to disable DOMAIN mode and Local mode:

    netsh firewall set opmode mode = DISABLE profile = ALL

    To disable Windows Defender Firewall services as image 2:

    Please open cmd.exe with administrator privilege and run the following command:

    reg add hklm\system\currentcontrolset\services\mpssvc /t reg_dword /v start /d 4 /f

    Hope my answer will help you!

    ---Please Accept as answer if the reply is helpful---

    Best Regards,
    Sunny

    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-08-11T16:35:07.523+00:00

    You wouldn't want to disable the service. Better to turn off the profile in question.
    Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
    run with elevated credentials would turn all three profiles off.

    --please don't forget to Accept as answer if the reply is helpful--

    1 person found this answer helpful.
    0 comments No comments

  2. Doria 1,246 Reputation points
    2020-08-12T15:01:14.717+00:00

    Hi, thanks for your answer.

    So, are the two commands equivalents?

    "netsh advfirewall set allprofiles state off" IS THE SAME TO "netsh firewall set opmode mode = DISABLE profile = ALL" OR "netsh firewall set opmode disable" ?

    Also, besides Windows Defender Firewall service does exist a Windows Firewall service? Or the firewall job are done by the Defender service?

    Thanks.

    0 comments No comments

  3. Anonymous
    2020-08-12T15:10:21.74+00:00

    What is the end goal here? If you simply want the firewall off for all profiles then you can execute (with elevated credentials) PowerShell
    Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

    or from elevated cmd.exe
    netsh firewall set opmode mode=disable profile=ALL

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  4. Doria 1,246 Reputation points
    2020-08-12T17:36:51.077+00:00

    Okay, I understood, but is there a Firewall service? Yes or No?

    Thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.