How to Create a Firewall Rule Using PowerShell.

In this tutorial, we will create a new inbound or outbound firewall rule and adds                                     the rule to the target computer.

PS C:\WINDOWS\system32> New-NetFirewallRulecmdlet New-NetFirewallRule at command pipeline position 1
Supply values for the following parameters:
DisplayName:
This will update the display name of the firewall. Now, we will update the powershell command with complete details.
 New-NetFirewallRule -DisplayName "Block Outbound Port 80"









You can run in your Windows 10 machine for checking the firewall.










You will find the below FIREWALL window with Display name present.






Congratulations😊 you have created your firewall rule.







Comments

Popular posts from this blog

How to find the number of running process in my local machine.

How to do System Diagnostics