May 5, 2020

Block a Program from accessing Internet

Block a Program from accessing Internet

Step 1:

Open Power-Shell as Administrator

Step 2:

Copy & Paste the following code into the Power-shell. Replace the Program which you want to block internet.

Remove-NetFirewallRule -DisplayName "Block Adobe x86"
Remove-NetFirewallRule -DisplayName "Block Adobe"
New-NetFirewallRule -DisplayName "Block Adobe x86" -Direction Outbound -Program "C:\Program Files (x86)\Adobe" -Action Block
New-NetFirewallRule -DisplayName "Block Adobe" -Direction Outbound -Program "C:\Program Files\Adobe" -Action Block 

Replace the Adobe with your program name.

Reference : https://gist.github.com/consti/8022703

No comments:

Post a Comment