Microsoft Defender Windows helps protect your device by blocking unauthorized access and other risks. You can back up and restore Microsoft Defender settings on a new computer or troubleshoot any issues you have with the app. Here's how to back up and restore Microsoft Defender Windows 11.
Microsoft Defender Backup and Restore via Advanced Security
Step 1:
Open Settings on your computer, then click on Privacy & security on the left, then click on Windows Security on the right.

Step 2:
Continue to click Open Windows Security to open.

In the Windows Security application interface, select Firewall & network protection .

Step 3:
In the next interface, we select Advanced settings to open advanced settings for Microsoft Defender.

In this interface, if you want to export or backup Microsoft Defender settings, just click Export Policy . If you want to restore settings , click the Import Policy link .

We will export the Microsoft Defender settings backup file as a .wfw file format.

Backup and Restore Defender Firewall Using Command Prompt
We open Windows Terminal on the computer and then select and choose Command Prompt or PowerShell.

Then we enter the command below.
Command Prompt:
netsh advfirewall export "%userprofile%\Desktop\FirewallBackup.wfw"
With PowerShell:
netsh advfirewall export "$Env:USERPROFILE\Desktop\FirewallBackup.wfw"
To restore or import Firewall settings, run the command below using Command Prompt or PowerSehll
netsh advfirewall import "C:\Users\Richard\Desktop\FirewallBackup.wfw"