Force Onlooker Detection: registry value ForceOnlookerDetectionComputerHKLM\Software\Policies\Microsoft\HumanPresence
- Policy ID
- ForceOnlookerDetection
- Scope
- Computer Configuration
- Supported on
- At least Windows 11 Version 24H2
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- Windows Components › Human Presence
Registry
ForceOnlookerDetection
-ComputerHKLM\Software\Policies\Microsoft\HumanPresence Current key
ForceOnlookerDetection
REG_DWORDComputerHKLM\Software\Policies\Microsoft\HumanPresence Current key
- Enabled value
- Depends on the option value
- Element
- Choose one of the following actions
| Item | Stored value |
|---|---|
| Defaults to user choice | 0 |
| Forced On | 1 |
| Forced Off | 2 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\HumanPresence] ; Options (use only one) ; Defaults to user choice "ForceOnlookerDetection"=dword:00000000 ; Forced On "ForceOnlookerDetection"=dword:00000001 ; Forced Off "ForceOnlookerDetection"=dword:00000002
CMD
:: Options (use only one) :: Defaults to user choice reg add "HKLM\Software\Policies\Microsoft\HumanPresence" /v "ForceOnlookerDetection" /t REG_DWORD /d 0 /f :: Forced On reg add "HKLM\Software\Policies\Microsoft\HumanPresence" /v "ForceOnlookerDetection" /t REG_DWORD /d 1 /f :: Forced Off reg add "HKLM\Software\Policies\Microsoft\HumanPresence" /v "ForceOnlookerDetection" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\Software\Policies\Microsoft\HumanPresence' -Force | Out-Null # Options (use only one) # Defaults to user choice New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\HumanPresence' -Name 'ForceOnlookerDetection' -PropertyType DWord -Value 0 -Force | Out-Null # Forced On New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\HumanPresence' -Name 'ForceOnlookerDetection' -PropertyType DWord -Value 1 -Force | Out-Null # Forced Off New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\HumanPresence' -Name 'ForceOnlookerDetection' -PropertyType DWord -Value 2 -Force | Out-Null