What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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
Use an elevated Windows Terminal or Command Prompt to export the complete Microsoft Defender Firewall policy to a .wfw file, then import that file when you need to restore the policy. The companion netsh advfirewall dump command creates a readable script of the configuration. Together, these files let you recover from an incorrect rule change, document a working setup, or save the policy before a reset.
The important limitation is policy ownership: rules delivered by Active Directory Group Policy or mobile/device management can override a locally imported backup. Windows 11 also separates Domain, Private, and Public profiles, so verify the active profile and policy source before deciding that an import failed.
What does a Windows 11 Firewall backup contain?
A whole-policy export saves the current Microsoft Defender Firewall policy from the active policy store. It is broader than copying one allow or block rule: the export can include profile settings, inbound and outbound rules, and connection-security rules that are part of the policy.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →The primary backup is a binary .wfw file created by netsh advfirewall export. A separate text dump is useful for review because it records a command script representing the current configuration. The dump is a companion record, not a replacement for the policy export when you need a complete, direct restore.
#1 Best Overall
- Spacious Design: Measuring 21.1" wide and 14.1" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
- Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy ergonomic support with the integrated cushioned wrist rest.
- Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
- Durable Surface: Work with confidence on our lap desk's solid surface, featuring a sleek black carbon color, ensuring optimal air circulation to prevent your laptop from overheating.
- On-the-Go Convenience: With an integrated handle and lightweight design (2.8 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
Windows Firewall profiles are separate scopes
Windows Firewall has three network profiles:
- Domain: used when Windows identifies a domain-authenticated network.
- Private: intended for networks you trust, such as a home or controlled office network.
- Public: intended for untrusted networks such as hotels, airports, and cafés.
A policy can contain settings and rules that behave differently by profile. Always verify which profile is active when testing a restored rule.
How do I back up all Windows 11 Firewall rules?
Sign in with an administrator account, open an elevated terminal, create a protected backup folder, and export both the binary policy and a readable dump. The commands below work in Windows 11 and preserve the exact path used for later recovery.
1. Open an elevated command window
- Open Start and search for Windows Terminal or Command Prompt.
- Right-click the result and choose Run as administrator.
- Approve the User Account Control prompt. A non-elevated window commonly fails with an access-denied error when it tries to read or write policy data.
2. Create and protect a backup directory
Create a directory on a local disk, an encrypted removable drive, or a controlled network location. For a simple local folder, run:
mkdir C:Backups
Choose a location that will survive the change you are preparing for. If you are about to reset or reinstall Windows, a folder on the system volume may not survive that operation; copy the resulting files to separate storage as well.
3. Export the complete policy to a .wfw file
Run:
netsh advfirewall export "C:Backupsfirewall_backup.wfw"
The export operation writes the current firewall policy settings to the specified file. Keep the extension as .wfw; it identifies a policy export that the matching import command can load later.
4. Create a readable configuration dump
Run a second command:
netsh advfirewall dump > "C:Backupsfirewall_dump.txt"
The dump displays a configuration script that can be used to recreate the current configuration. Open the text file with a plain-text editor to inspect rule commands, profile settings, and other values without attempting to edit the binary export.
5. Confirm that both files exist
Check the directory in File Explorer or run:
dir C:Backupsfirewall_backup.wfw C:Backupsfirewall_dump.txt
Record the creation date and, if the files will be moved between systems, protect them with the same access controls used for other security configuration backups. Firewall rules can reveal application names, ports, addresses, and internal services.
Rank #2
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
How do I verify what was backed up?
Use the command line for a quick state and rule inventory, then use the graphical console for a policy review. Verification before a change gives you a baseline against which to compare the restored system.
Check profile state
netsh advfirewall show allprofiles state
This reports whether the Domain, Private, and Public profiles are enabled. It does not by itself prove that every rule is appropriate; it confirms the profile-level state that was visible when you made the backup.
List the active firewall rules
netsh advfirewall firewall show rule name=all
The output can be long. Redirect it to a text file if you need an audit copy, for example by adding > "C:Backupsfirewall_rules_before.txt" to the command. Compare important rule names, directions, actions, profiles, and enabled states after a restore.
Review the Windows interface
Open Windows Security > Firewall & network protection > Advanced settings. The Advanced Security console exposes inbound rules, outbound rules, and connection-security rules, allowing you to inspect the entries that a command-line listing may be difficult to scan.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteHow do I restore a Windows 11 Firewall backup?
Use an elevated prompt and import the saved .wfw file into the current policy store. Because this is a whole-policy operation, save any newer changes first and plan to verify connectivity immediately afterward.
- Sign in with an administrator account and open Windows Terminal (Admin) or Command Prompt (Admin).
- Confirm that the backup file is available at the intended path, such as
C:Backupsfirewall_backup.wfw. - Run the import command:
netsh advfirewall import "C:Backupsfirewall_backup.wfw"
- Wait for the command to report completion. Do not close the elevated window while it is processing.
- Run
netsh advfirewall show allprofiles stateandnetsh advfirewall firewall show rule name=allto inspect the resulting policy. - Open Windows Security > Firewall & network protection > Advanced settings and check the inbound, outbound, and connection-security rule collections.
- Test the application or service that motivated the restore. If the change affects remote administration, perform the test from a second device or keep local console access available.
An import loads the saved firewall policy into the current policy store; it is not a selective merge of one rule. Treat it as a broad replacement of the local policy state and preserve a fresh export if you might need to return to the pre-import configuration.
How can I save the policy before resetting Windows Firewall?
Use the reset command’s export option when you want to return the local firewall policy to defaults but still retain a recovery file. Run this from an elevated prompt:
Rank #3
- Note: Not suitable for MacBooks released after 2023 or devices with a protruding front camera; Not applicable to full-screen or notch-style tempered glass screen protectors; Do not use on the rear camera of the phone.
- 💻 Why Do You Need a Webcam Cover Slide? — Safeguard your privacy by covering your webcam with our reliable webcam cover when not in use. Don't let anyone secretly watch you. Stay protected!
- ✅ Thin & Stylish — Enhance your laptop's functionality and aesthetics with our 0.027" ultra-thin webcam covers. Seamlessly close your laptop while adding a touch of sophistication.
- ✅ Fits Most Devices — Compatible with laptops, phones, tablets, desktops! Keep your privacy intact on Ap/ple, Mac/Book, iPh/one, iP/ad, H/P, L/novo, De/ll, Ac/er, As/us, Sa/msung devices.
- ✅ 365 Days Protection — Our upgraded 3.0 adhesive ensures a strong hold that won't damage your equipment. Experience reliable, long-term privacy protection day in and day out.
netsh advfirewall reset export "C:Backupsfirewall_before_reset.wfw"
This saves the current policy before resetting the local firewall policy to its defaults. Afterward, verify the three profile states and test required network access. If the reset causes an outage, import the saved file:
Recommended Free Tools
netsh advfirewall import "C:Backupsfirewall_before_reset.wfw"
What a reset does to managed policy
A reset does not permanently defeat organizational control. Microsoft states that policies applied by an organization are reapplied after a reset. The netsh reference also explains that resetting a Group Policy object returns settings to NotConfigured and deletes firewall and connection-security rules in that policy store.
As a result, a reset can appear to work and then be followed by the return of domain-managed rules. That behavior indicates policy enforcement, not a corrupt export. Identify the policy source before repeatedly resetting or importing files.
Why might an imported firewall backup appear not to work?
The most common reason is that the imported file changed a local store while a higher-priority management system continues to define the effective policy. Profile selection, policy precedence, file access, and an overly broad restore can also explain unexpected results.
Active Directory Group Policy or device management is overriding local settings
Domain Group Policy and mobile/device management can deliver firewall rules and profile settings. A local persistent-store backup may therefore import successfully while having little visible effect on the effective policy. Check the computer’s management and policy source before concluding that the import failed.
Free tools Windows power users keep installed
One-click scans. No signup required.
The rule applies to a different profile
A rule scoped to Private may not apply while the network is classified as Public, and a Domain-scoped rule will not necessarily be active on a non-domain network. Check the network classification and the rule’s profile scope in Advanced Security or in the rule listing.
The backup path is unavailable or inaccessible
Mapped drive letters can be different in an elevated session, removable media can be disconnected, and permissions can prevent the administrator token from reading a file. Use a fully qualified local path, verify the file with dir, and copy the backup to a location that the elevated account can access.
Rank #4
- Anti-Slip Surface - Transform your laptop into a mobile workstation with the AboveTEK portable laptop lap desk. The anti-slip surface provides a strong grip for laptops up to 15.6 inches(Diagonal), while the double rubber strip on the bottom ensures a stable display or typing experience on your lap, couch, or bed.
- Retractable Mouse Pad - Retractable laptop mouse pad extends on both directions for the left/right handed with elevation along the edges for stopping mouse from falling off. The size of laptop tray is 14" X 9.7" and the size of mouse pad is 7.4" X 6.1".
- Effective Heat Shield - The effective heat shield made of sturdy and thick material protects your laptop from overheating. Prioritizes your comfort and safety, an ideal lap pad or board for working anywhere.
- EASY to Carry and Store - With an ergonomic and simplistic design, the lap desk is portable to store in a backpack. Only 15" in size, 2.2 lb of weight and with slim 0.6 inch thickness, it is ready to be easily carried around.
- Widely Applicable - The smooth platform accommodates laptops and tablets up to 15.6 inches(Diagonal), making it a versatile accessory and one of the best gifts for mom, dad, students and professionals. Perfect for use as a laptop bed tray or tablet holder anywhere at home, library, or park.
The restore was broader than intended
Importing a complete policy can replace legitimate rules created after the backup. If you only need one application rule, use selective rule migration instead of importing the whole file.
How do I migrate only selected firewall rules?
PowerShell’s Copy-NetFirewallRule cmdlet is designed for targeted migration. It copies a complete rule together with its associated filters to the same or another policy store, avoiding the broad effect of a whole-policy .wfw import.
When selective migration is safer
- You are moving one application exception while keeping newer rules.
- You are testing a rule in a staging policy store before applying it elsewhere.
- The source and destination machines have different baseline policies.
- An organization manages most settings and you are permitted to move only a specific rule.
Plan the copy before running it
Identify the rule by its stable name, confirm its direction, action, enabled state, profile scope, ports, addresses, and program or service association, then choose the destination policy store. Use PowerShell help for the exact parameter set supported by the Windows 11 build you administer, and run the cmdlet in an elevated PowerShell session. After copying, inspect the destination rule and test the associated application; copying a rule does not remove conflicting rules already present in the destination.
Which backup and recovery method should I choose?
The right method depends on whether you need every setting, a human-readable record, a clean baseline, or one rule. The following comparison keeps those choices distinct.
| Method | What it preserves or changes | Best use | Main limitation |
|---|---|---|---|
netsh advfirewall export |
Complete current firewall policy in a binary .wfw file |
Whole-policy backup and direct restoration | Not convenient to read or edit manually; local policy can be overridden by management policy |
netsh advfirewall dump |
Readable command script representing the current configuration | Auditing, documentation, and examining settings | Supplementary record; it is not the binary policy package used by import |
netsh advfirewall reset with export |
Saves the current policy, then returns local policy to defaults | Recovery from a badly damaged or confusing local configuration | Can remove local rules and does not stop organizational policy from returning |
Copy-NetFirewallRule |
Copies one complete rule and its associated filters | Selective migration with less disruption | Requires deliberate rule identification and destination-policy planning |
What should I check before and after a restore?
Use this checklist when the firewall protects a workstation, server, or remote-management path.
Before exporting or importing
- Confirm that the terminal is elevated and that you are authorized to change firewall policy.
- Record the computer name, Windows 11 edition or build, date, active network profile, and policy-management status.
- Export the current policy before importing another backup, so the current state remains recoverable.
- Keep local or out-of-band access available if the change could block remote administration.
- Store the
.wfwfile and text dump in a protected location and retain their creation dates.
After importing or resetting
- Check all three profile states with
netsh advfirewall show allprofiles state. - List rules and verify critical inbound, outbound, and connection-security entries.
- Confirm the active network profile and test the affected application or service.
- Check whether Group Policy or device management reapplies settings after the change.
- Document any rule that was intentionally added, removed, or changed during recovery.
Why should I not stop the Windows Defender Firewall service?
Stopping the Windows Defender Firewall service, also known as MpsSvc, is not a supported troubleshooting shortcut. Microsoft warns that stopping the service can cause problems with Start, application installation and updates, activation, and compatibility.
If temporary disabling is genuinely required for a controlled test, change the relevant firewall profile state while leaving the service running, then restore the profile state promptly. Service stoppage can create side effects that obscure the original rule problem and may affect more Windows components than the single connection you are testing.
Best Value
- Spacious Design: Measuring 21.1" wide and 12" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
- Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy laptop support with the integrated device ledge.
- Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
- Durable Surface: Work with confidence on our lap desk's solid surface, featuring a blush pink color, ensuring optimal air circulation to prevent your laptop from overheating.
- On-the-Go Convenience: With an integrated handle and lightweight design (2.14 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
Which recovery approach is safest for my situation?
Choose a whole-policy export and import when you need to reproduce a known-good local configuration. Keep the dump beside it for human review, use reset-with-export only when you intentionally want a defaults-based recovery, and use Copy-NetFirewallRule when one rule must move without replacing the rest of the policy.
For managed computers, first establish whether Active Directory Group Policy or device management owns the setting. A technically correct local restore cannot permanently override a higher-priority policy, so the lasting fix may require changing the organizational policy rather than repeating the import.
Frequently Asked Questions
Does a firewall export include Microsoft Defender Antivirus settings?
No. The netsh firewall export covers Microsoft Defender Firewall policy, including its profiles and rules; it is not a backup of antivirus preferences, exclusions, signatures, or other Windows Security components. Back up those components through their own management or configuration procedures.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Can I open a .wfw file in Notepad and edit a rule?
A .wfw file is a policy export intended for the netsh import operation, not a text configuration file. Use the readable dump for inspection and make changes through Windows Security, approved PowerShell cmdlets, or documented netsh commands before creating a new export.
Could restoring a firewall policy cut off my remote session?
Yes. A restored policy can remove or disable the inbound rule that permits remote administration, or change the profile under which that rule applies. Perform high-impact restores from local or out-of-band access when possible, and keep a pre-restore export so you can return to the previous state.
How should I preserve firewall backups for an audit?
Store the binary export and text dump with their creation date, computer identity, Windows build, active profile, and the person who authorized the change. Restrict write access so the files cannot be silently replaced, and retain a copy outside the machine if the backup is intended to survive a reset or disk failure.
Quick Recap
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.

