HOWTO switch off Defender in Windows Sandbox

Recently I tried to run a setup program into the Windows Sandbox, but Windows Defender blocked it.

About 60 seconds later, I discovered that I cannot disable/configure it from the usual UI.

After some investigation, I discovered that we can do it by a couple of commands in PowerShell with administrative access rights:

  • Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Control\CI\Policy” -Name “VerifiedAndReputablePolicyState” -Value “0”
  • CiTool.exe -r

After applying these changes, the setup program is no longer blocked.