Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

In this Itechguide, Victor teaches you how to block a program in firewall on Windows 10. The guide covers steps for 3 methods to block a program in firewall on Windows 10.

Option 1: Block a Program from Windows Defender Firewall

  • Type windows defender firewall in the search box. Then, from the search results, click Windows Defender Firewall with Advanced Security.
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • On the top left of Windows Defender Firewall with Advanced Security, click Outbound Rules.
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • Then, on the top right of the Outbound Rules window, click New Rule…
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • On the first screen of the New Rule wizard, select Program and click Next.
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • Then, select This program path and click Browse.
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • Navigate to the location of the executable for the program and double-click the exe.
In a 64-bits Windows 10 PC, 32-bits applications are installed on the %programfiles(x86)% while 64-bits applications are installed in the %programfiles% folder.
In this example, I want to block 7-Zip from running on my computer. I recently installed the 32-bits version of 7-Zip.
  • Because the program I want to block is a 32-bits program, I will enter %programfiles(x86)% in the File Name field and click Open.
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • When the %programfiles(x86)% folder opens, open the folder for the program you want to block.
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • Finally, double-click the exe file for the program you want to block on Windows 10 firewall.
  • You will be returned to the Specify the full path and executable name of the program that this rule matches window. Click Next.
The full path to the program you want to block will be displayed in the This program path field.
How to Block a Program in Firewall on Windows 10 from Windows Defender Firewall
  • Then, on the Specify the action to be taken when a connection matches the conditions specified in the rule window, select Block and click Next.
  • On the Specify the profiles for which this rule applies window, check the network profiles you want the rule to apply and click Next.
  • Finally, to block a program in firewall on Windows 10, give the new firewall rule a name and description and click Finish.
  • The new rule will become available on the Outbound Rules.
  • To disable the rule without deleting it, right-click the rule and select Disable Rule.
You may also copy or delete the rule by right-clicking the rule and selecting Copy or Delete respectively.

Option 2: Block a Program with Command Prompt

  • Type command prompt in the search box, right-click Command Prompt and select Run as Administrator.
How to Block a Program in Firewall on Windows 10 with Command Prompt
  • If you receive a User Account Control confirmation, click Yes.
Before you proceed to the next step, you need to get the full path to the executable file for the program you want to block on Windows 10 firewall with command prompt.
In a 64-bits Windows 10 PC, 32-bits applications are installed on the %programfiles(x86)% while 64-bits applications are installed on the %programfiles% folder. The executable of programs can be found on the program’s folder within the %programfiles(x86)% or %programfiles% folders.
  • Finally, to block a program in firewall on Windows 10, on Command Prompt, type the command below and press enter.
netsh advfirewall firewall add rule name="Block 7-Zip 32-bit" dir=out action=block program="%ProgramFiles% (x86)\7-Zip\7zG.exe" enable=yes
Change the name parameter to the name of your firewall rule. Also, change the program parameter to the full path to the executable for the program you want to block.
  • The command will run and the firewall rule will be created on the Outbound Rules.

Option 3: Block a Program with PowerShell

  • Type powershell in the search box. Windows 10 search will find and select Windows PowerShell. Below Windows PowerShell, click Run as Administrator.
  • If you receive a User Account Control confirmation, click Yes.
How to Block a Program in Firewall on Windows 10 with PowerShell
  • On the PowerShell prompt, type the command below and press enter.
New-NetFirewallRule -DisplayName "Block CCleaner 64-bit" -Direction Outbound -Program "C:\Program Files\CCleaner\CCleaner64.exe" -RemoteAddress LocalSubnet -Action Block
Change the DisplayName parameter to the name of your firewall rule. Also, change the Program parameter to the full path to the executable for the program you want to block.
  • The PowerShell command will run and the firewall rule will be created on the Outbound Rules.

As you can see, it is very easy to block a program in firewall Windows 10! I hope you found this Itechguide helpful. If you found it helpful, kindly spare 2 minutes to share your views on our community platform at [discourse_topic_url].

Alternatively, you could ask a question, leave a comment or provide feedback at [discourse_topic_url]. The community staff and member will respond to them as soon as possible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Finally, for more Windows 10 Itechguides, visit our Windows 10 How-To page.

Quick Recap

Also popular on Amazon
Also popular on Amazon

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi