Jul 16, 2025

How to enable Memory Integrity on Windows 11

Last tested: July 13, 2026

Open CMD as admin and paste the following command. Microsoft lists this exact command for turning on memory integrity, which it also calls hypervisor-enforced code integrity or HVCI (Enable memory integrity).

				
					reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v Enabled /t REG_DWORD /d 1 /f
				
			

It should look like this.

Restart your PC and you are good to go.

Sources & References

The technical claims in this guide are backed by the official documentation below and validated against our own testing.

Frequently asked questions

How do I enable Memory Integrity on Windows 11?

Open CMD as administrator and add the HypervisorEnforcedCodeIntegrity registry value with the command in this guide, then restart your PC. The single reg add command enables it without digging through Windows Security menus.

Do I need to restart after enabling it?

Yes. Memory Integrity only takes effect after a full restart. Once the PC comes back up, the setting is active.