This tutorial will show you how to export (backup) and import (restore) AppLocker policy rules using an XML file in Windows 10 and Windows 11.
AppLocker is included in Local Security Policy (secpol.msc) to configure Application Control Policies in the Pro, Enterprise, and Education editions of Windows 10 and Windows 11. Local Security Policy is not available in the Home edition.
You can use AppLocker to create rules to allow or block executable (.exe, .com) files, Windows installer (.msi, .msp, .mst) files, script ( .ps1, .bat, .cmd, .vbs, .js) files, and/or packaged apps (Microsoft Store apps) from running for everyone, specific user(s), and/or specific group(s).
You can export your AppLocker policy rules to an XML file to review or as a backup, and import the XML on any computer to restore.
References:
What Is AppLocker
This article for the IT professional describes what AppLocker is.
learn.microsoft.com
Export an AppLocker policy from a GPO
This article for IT professionals describes the steps to export an AppLocker policy from a Group Policy Object (GPO) so that it can be modified.
learn.microsoft.com
Export an AppLocker policy to an XML file
This article for IT professionals describes the steps to export an AppLocker policy to an XML file for review or testing.
learn.microsoft.com
Import an AppLocker policy from another computer
This article for IT professionals describes how to import an AppLocker policy.
learn.microsoft.com
Import an AppLocker policy into a GPO
This article for IT professionals describes the steps to import an AppLocker policy into a Group Policy Object (GPO).
learn.microsoft.com
You must be signed in as an administrator to export and import AppLocker policy rules.
Importing a policy will permanently replace all existing policy rules on the computer.
Contents
- Option One: Export AppLocker Policy Rules to XML File
- Option Two: Import AppLocker Policy Rules from XML File
1 Open Local Security Policy (secpol.msc).
2 Expand open Application Control Policies in the left pane of the Local Security Policy window, right click on AppLocker, and click/tap on Export Policy. (see screenshot below)
3 Navigate to where (ex: Desktop) you where you want to save the XML file, type a file name (ex: "AppLocker_policy_rules") you want for the XML file, and click/tap on Save. (see screenshot below)
4 Click/tap on OK when the export has finished. You will see how many rules were exported from the policy. (see screenshot below)
1 Open Local Security Policy (secpol.msc).
2 Expand open Application Control Policies in the left pane of the Local Security Policy window, right click on AppLocker, and click/tap on Import Policy. (see screenshot below)
3 Navigate to and select an exported XML file you want from Option One, and click/tap on Open. (see screenshot below)
4 Click/tap on Yes to confirm. (see screenshot below)
Importing a policy will permanently replace all existing policy rules on the computer.
5 Click/tap on OK when the import has finished. You will see how many rules were replaced (removed) from the policy, and how many rules were imported to the policy. (see screenshot below)
That's it,
Shawn Brink
Related Tutorials
Last edited:











