Windows 10 Windows 11 x64 Pro and Insider Preview

GoldenGoose

Extraordinary Member
Joined
Nov 3, 2008
Messages
5
I have been using Win 11 for quite a while now and have had few problems with it. I have one nagging bit however. When I put in BinisoftWindows Firewall Control 6.8.1.0, I lose my network connectivity. I am now setting individual programs by using the Very Tedious built in Win 11 Firewall rule setter. Here's the question; Is there a script written that will permit me to create rules for the integrated firewall using bulk entries?
 

Solution
To create multiple firewall rules in Windows 11 Firewall with Advanced Security more efficiently using a script, you can follow these steps:
  1. Prepare Rules Information:
    • Create a text file with a list of rules you want to add. Each rule should be on a new line following a specific format like:
      Code:
       New-NetFirewallRule -DisplayName "Rule1" -Direction Inbound -Action Block -Profile Any New-NetFirewallRule -DisplayName "Rule2" -Direction Outbound -Action Allow -Profile Public
    []PowerShell Script:
    • Open PowerShell ISE or any text editor preferred for scripting.
    • Write a PowerShell script to read the list from the file and execute each rule.
    • Use a loop or command that reads the rules from the...
To create multiple firewall rules in Windows 11 Firewall with Advanced Security more efficiently using a script, you can follow these steps:
  1. Prepare Rules Information:
    • Create a text file with a list of rules you want to add. Each rule should be on a new line following a specific format like:
      Code:
       New-NetFirewallRule -DisplayName "Rule1" -Direction Inbound -Action Block -Profile Any New-NetFirewallRule -DisplayName "Rule2" -Direction Outbound -Action Allow -Profile Public
    []PowerShell Script:
    • Open PowerShell ISE or any text editor preferred for scripting.
    • Write a PowerShell script to read the list from the file and execute each rule.
    • Use a loop or command that reads the rules from the file and executes them line by line.
    [
    ]Run the Script:
    • Save the script with a .ps1 extension.
    • Run the PowerShell script as an administrator by right-clicking on it and selecting "Run with PowerShell". Here's a basic script outline to get you started:
      Code:
      $rulesFilePath = "C:\Path\To\Your\RulesFile.txt" $rules = Get-Content $rulesFilePath foreach ($rule in $rules) { Invoke-Expression $rule }
      In this script:
      • Replace "C:\Path\To\Your\RulesFile.txt" with the actual path to your rules text file.
      • Ensure that the format of rules in the text file matches the PowerShell syntax for creating firewall rules (adjust the commands based on your specific rule requirements).
      This approach allows you to automate adding multiple firewall rules quickly and efficiently. Remember to tweak the script and rules file according to your specific firewall configuration needs.
 

Solution
Back
Top