Encrypting the Paging file is a great way to prevent users from reading data paged to disk. However, it increases filesystem operations, which increases the load on your system resources. So, depending on what you need, you can decide whether to turn on or off this feature. In this post, we will discuss how to enable or disable Virtual Memory Paging File Encryption in Windows 11.
Enable Virtual Memory Paging File Encryption
The paging file, also referred to as “Page File” and “Virtual Memory,” is essential for the system to manage memory efficiently. It removes infrequently accessed modified data from physical memory, allowing for better utilization of physical memory for frequently accessed data. Not just that, Windows relies on the page file to store data when physical memory (RAM) reaches its capacity. To enable or disable Virtual Memory Paging File Encryption, you can follow one of the following methods.
- Using the Command Prompt
- Using the Group Policy Editor
- Using the Registry Editor
Let us discuss them in detail.
1] Turn on or off Virtual Memory Paging File Encryption using the Command Prompt
First of all, let us use the Command Prompt to allow encryption of virtual memory paging files or disable it. For that, first open Run, type “cmd”, hit Ctrl + Shift + Enter. Click Yes when the UAC prompt appears.
Run the following command to check if the Paging file is encrypted right now.
fsutil behavior query encryptPagingFile
You will see a message saying – PageFile encryption is DISABLED or PageFile encryption is ENABLED.
To enable PageFile encryption, you need to run the following command
fsutil behavior set encryptPagingFile 1
To disable PageFile encryption, run the following command.
fsutil behavior set encryptPagingFile 0
After enabling or disabling encryption, you have to reboot the system, and then again run the first command to check if the encryption is successful.
Note: The commands mentioned above are Case-sensitive, so, do not alter anything before executing them. If the casing is different, the command will not run, in that case, you can run “fsutil behavior set <options>” and check the correct command for your PC.
2] Enable or Disable Virtual Memory Paging File Encryption using the Group Policy Editor
To turn on or off Virtual Memory Paging File Encryption, we can use the Group Policy Editor. This way, the changes will be applied to all the users connected to the domain network.
Do keep in mind that the Local Group Policy Editor is only available in the Windows 11/10 Pro, Enterprise, and Education editions. If you are a Home user and don’t have the Group Policy Editor, go to the next method.
Open the Group Policy Editor on your computer and navigate to the following location.
User Configuration > Administrative Templates > System > Filesystem > NTFS
When you click on the NTFS folder, you will see the Enable NTFS pagefile encryption policy, double-click on it to open.
To disable Paging File encryption, set the policy to Not configured or Disabled, and click on Apply > OK. However, if you want to disable this feature, select Enabled, and click Apply > Ok. After making the changes, reboot your computer and your issue will be resolved.
3] Turn on or off Virtual Memory Paging File Encryption using the Registry Editor
If you don’t have the Group Policy Editor, try the Registry Editor to do the same. But before moving forward, make sure to create a backup of your registry. They will be used if something goes wrong.
Now, open Notepad and paste the following lines of code into two separate files.
Enable Paging File Encryption
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
Disable Paging File Encryption
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] "NtfsEncryptPagingFile"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies] "NtfsEncryptPagingFile"=-
Give the following scripts any name when saving but make sure to add .reg extension.
Once the files are created, go to their location, and double-click. A UAC prompt will ask you to confirm your actions, click Yes when prompted, and the script will make the required changes.
After running the file, reboot your computer and check if the issue is resolved.
Read: How to delete PageFile.sys at shutdown
Should I disable virtual memory Windows 11?
Disabling virtual memory is not harmful unless you require a lot of memory and your physical RAM is unable to accommodate it. Otherwise, you might encounter issues when running applications and using various features of Windows 11. So, I recommend not disabling virtual memory in Windows 11 unless you know what you are doing.
Read: How to increase Page File size or Virtual Memory in Windows?
How to enable file encryption on Windows 11?
To encrypt any file of your choice, open File Explorer, and navigate to the folder hosting that file. Now, right-click on the folder and select Properties. Go to Security > Advanced, tick the option that says “Encrypt to secure data”, and click OK.
Read: Encrypt contents to secure data option is disabled in Windows.