A paging file (aka: "page file" and "virtual memory") enables the system to remove infrequently accessed modified data from physical memory to let the system use physical memory more efficiently for more frequently accessed data. Windows also uses the page file to store data when physical memory (RAM) is full.
Encrypting the page file prevents malicious users from reading data that has been paged to disk, but also adds processing overhead for filesystem operations.
See also:

ADMX_FileSys Policy CSP - Windows Client Management
Learn more about the ADMX_FileSys Area in Policy CSP.
docs.microsoft.com
This tutorial will show you how to enable or disable virtual memory paging file encryption in Windows 10 and Windows 11.
You must be signed in as an administrator to enable or disable NTFS pagefile encryption.
Contents
- Option One: Enable or Disable Virtual Memory Paging File Encryption using Command
- Option Two: Enable or Disable Virtual Memory Paging File Encryption in Local Group Policy Editor
- Option Three: Enable or Disable Virtual Memory Paging File Encryption using REG file
1 Open Windows Terminal (Admin), and select either Windows PowerShell or Command Prompt.
2 Do step 3 (status), step 4 (enable), step 5 (disable) below for what you want.
3 See if Paging File Encryption is Currently Disabled or Enabled
A) Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshots below)
fsutil behavior query encryptpagingfile
B) See if paging file encryption is currently Disabled or Enabled.
4 Enable Paging File Encryption
A) Copy and paste the command below into Windows Terminal (Admin), press Enter, and go to step 6. (see screenshots below)
fsutil behavior set encryptpagingfile 1
5 Disable Paging File Encryption
This is the default setting.
A) Copy and paste the command below into Windows Terminal (Admin), press Enter, and go to step 6. (see screenshots below)
fsutil behavior set encryptpagingfile 0
6 Close Windows Terminal (Admin).
7 Restart the computer to apply.
The Local Group Policy Editor is only available in the Windows 10/11 Pro, Enterprise, and Education editions.
All editions can use Option Three to configure the same policy.
1 Open the all users, specific users or groups, or all users except administrators Local Group Policy Editor for how you want this policy applied.
2 Navigate to the policy location below in the left pane of the Local Group Policy Editor. (see screenshot below)
User Configuration > Administrative Templates > System > Filesystem > NTFS
3 In the right pane of NTFS in the Local Group Policy Editor, double click/tap on the Enable NTFS pagefile encryption policy to edit it. (see screenshot above)
4 Do step 5 (enable) or step 6 (disable) below for what you want.
5. Enable Paging File Encryption
This will override Option One.
A) Select (dot) Not Configured, click/tap on OK, and go to step 7. (see screenshot below)
6. Disable Paging File Encryption
This is the default setting.
A) Select (dot) Enabled, click/tap on OK, and go to step 7. (see screenshot below)
7 Close the Local Group Policy Editor.
8 Restart the computer to apply.
1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.
2. Enable Paging File Encryption
This will override Option One.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Enable_virtual_memory_paging_file_encryption.reg
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsEncryptPagingFile"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies]
"NtfsEncryptPagingFile"=dword:00000001
3. Disable Paging File Encryption
This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Disable_virtual_memory_paging_file_encryption.reg
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsEncryptPagingFile"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies]
"NtfsEncryptPagingFile"=-
4 Save the REG file to your desktop.
5 Double click/tap on the downloaded REG file to merge it.
6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
7 Restart the computer to apply.
8 You can now delete the downloaded REG file if you like.
That's it,
Shawn Brink
Attachments
Last edited: