Home Windows How to Backup and Restore Microsoft Defender Firewall…
Windows

How to Backup and Restore Microsoft Defender Firewall in Windows 11

How to Backup and Restore Microsoft Defender Firewall in Windows 11
Richard
Written byRichardTech Writer, IT Professional
Aug 8, 2025 Updated Apr 3, 2026 2 min read

Your Windows Firewall is like a security guard for your computer. It watches all the data coming in and out of your device. It blocks anything that looks suspicious or unauthorized.

Windows 11 makes it easy to back up your firewall settings. Why would you want to do this? If you get a new computer, you can restore your exact same firewall setup. Or if something goes wrong, you can restore your settings to how they were before.

This article shows you two simple ways to backup and restore your Microsoft Defender Firewall settings.

Method 1: Using Windows Security App

This is the easiest way for most people. Follow these steps:

  1. Click the Start button on your taskbar.
  2. Select Settings from the menu.
windows 11 start menu settings updated

  1. Click Privacy & security on the left side.
  2. Find the Windows Security tile and click it.
Windows Security button in Settings app for Firewall backup

  1. Click the Open Windows Security button.
Open Windows Security button in Settings app

  1. In the Windows Security app, select Firewall & network protection. You can also use this shortcut: Firewall & network protection.
Click Firewall and network protection in Windows Security

  1. Scroll down and click the Advanced settings link at the bottom.
Advanced settings option in Windows Security app

To Back Up Your Settings:

  1. In the window that opens, click Export Policy.
  2. Choose where you want to save your backup file.
  3. Give the file a name (it will be a .wfw file).
  4. Click Save.
Export or import Firewall settings in Windows 11

To Restore Your Settings:

  1. Go back to the Advanced settings window.
  2. Click Import Policy.
  3. Find your backup file and open it.
  4. Your firewall settings will be restored.

Method 2: Using Command Prompt or PowerShell

⚠️ Admin Required: This method requires administrator privileges.

  1. Open the Windows Terminal app as administrator.
  2. Choose either the Command Prompt or PowerShell tab.

To Back Up Your Settings:

Using Command Prompt:

💻Code
netsh advfirewall export "%userprofile%\Desktop\FirewallBackup.wfw"

Using PowerShell:

💻Code
netsh advfirewall export "$Env:USERPROFILE\Desktop\FirewallBackup.wfw"

This creates a backup file called “FirewallBackup.wfw” on your Desktop. What happens? Your firewall settings are saved as a single file you can use anytime.

To Restore Your Settings:

Run this command in either Command Prompt or PowerShell:

💻Code
netsh advfirewall import "C:\Users\User\Desktop\FirewallBackup.wfw"

⚠️ Note: Replace “C:\Users\User\Desktop\FirewallBackup.wfw” with the actual location of your backup file.

That’s all you need to do!

Summary

Backing up and restoring your Microsoft Defender Firewall settings in Windows 11 is simple and important. You have two options:

  • Windows Security App: Use the Export and Import Policy buttons. This is easier for most people.
  • Command Prompt or PowerShell: Use special commands to back up and restore your settings. This method requires administrator privileges.

Why do this? Regularly backing up your firewall settings lets you quickly restore them if something goes wrong. It also helps when you set up a new computer.

What happens when you do this? Your firewall configuration stays the same, and your network security stays protected. Always keep your backup files in a safe place where only you can access them.

Was this guide helpful?

Tags: #Windows 11
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2452 articles → Twitter

📚 Related Tutorials

How to Turn On or Off Microsoft Defender Firewall in Windows 11
Windows How to Turn On or Off Microsoft Defender Firewall in Windows 11

Leave a Reply

Your email address will not be published. Required fields are marked *