Restore-FirewallRules
1.0.0
Uses the built-in "netsh advfirewall import", the same as "Import Policy..." in the Windows Firewall console.
IMPORTANT: an import REPLACES all local firewall rules and profile settings with those in the file. Rules that
are not in the file are gone afterwards. Rules from Group Policy are not affected.
Before importing, the script saves the current state with Backup
IMPORTANT: an import REPLACES all local firewall rules and profile settings with those in the file. Rules that
are not in the file are gone afterwards. Rules from Group Policy are not affected.
Before importing, the script saves the current state with Backup
Uses the built-in "netsh advfirewall import", the same as "Import Policy..." in the Windows Firewall console.
IMPORTANT: an import REPLACES all local firewall rules and profile settings with those in the file. Rules that
are not in the file are gone afterwards. Rules from Group Policy are not affected.
Before importing, the script saves the current state with Backup-FirewallRules.ps1 logic (netsh export) next
to the file you restore, so you can go back. It asks for confirmation unless you add -Confirm:$false.
Run it as administrator. Do not run it over a remote session whose connection depends on a rule that the
backup does not contain.
Show more
IMPORTANT: an import REPLACES all local firewall rules and profile settings with those in the file. Rules that
are not in the file are gone afterwards. Rules from Group Policy are not affected.
Before importing, the script saves the current state with Backup-FirewallRules.ps1 logic (netsh export) next
to the file you restore, so you can go back. It asks for confirmation unless you add -Confirm:$false.
Run it as administrator. Do not run it over a remote session whose connection depends on a rule that the
backup does not contain.
Installation Options
Owners
Copyright
(c) 2026 Coinetic AI Security - https://coinetic.io. MIT licence.
Package Details
Author(s)
- Coinetic AI Security - https://coinetic.io
Tags
Coinetic Windows WindowsServer Firewall WindowsFirewall FirewallManager Restore Import Rules
Dependencies
This script has no dependencies.
Release Notes
1.0.0: restores a .wfw backup; backs up the current rules first; asks before it replaces anything.
FileList
- Restore-FirewallRules.nuspec
- Restore-FirewallRules.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.0 (current version) | 9 | 12/5/2026 |