Open in the explorer

Lock password protected sections after user hasn't worked on them for a time

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Microsoft OneNote 2016 › OneNote Options › Password
Supported on
At least Windows Server 2008 R2 or Windows 7
ADMX file
onent16.admx
Internal name
onent16/L_Lockpasswordprotectedsectionsafteruserhasntworkedonthemforatime

Explanation

OneNote supports password protecting sections and they are unlocked once a user types the password and can be locked again by either a timeout period or when you navigate away from the section. This option will lock the section after the user hasn't used the section for the selected amount of time.

Registry

HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\onenote\security
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: onent16/L_Lockpasswordprotectedsectionsafteruserhasntworkedonthemforatime
$k = 'HKCU:\software\policies\microsoft\office\16.0\onenote\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Check to lock sections
# unchecked: 0
Set-ItemProperty -Path $k -Name 'lockidlesections' -Value 1 -Type DWord
# Time interval (minutes) to lock password protected sections
# Possible options:
#   1 = 1
#   5 = 5
#   10 = 10
#   15 = 15
#   30 = 30
#   60 = 60
#   120 = 120
#   240 = 240
#   480 = 480
#   720 = 720
#   1440 = 1440
Set-ItemProperty -Path $k -Name 'passwordtimeout' -Value 10 -Type DWord

Disable

# Disable: onent16/L_Lockpasswordprotectedsectionsafteruserhasntworkedonthemforatime
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": onent16/L_Lockpasswordprotectedsectionsafteruserhasntworkedonthemforatime
$k = 'HKCU:\software\policies\microsoft\office\16.0\onenote\security'
Remove-ItemProperty -Path $k -Name 'lockidlesections' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'passwordtimeout' -ErrorAction SilentlyContinue

Options (2)

LabelControlRegistry valueREG typeConstraints / details
Check to lock sectionsL_ChecktolocksectionsCheck boxbooleanlockidlesectionsREG_DWORD
Checked: REG_DWORD = 1
Unchecked: REG_DWORD = 0
Time interval (minutes) to lock password protected sections:L_TimeintervalminutestolockpasswordprotectedsectionsDrop-down listenumpasswordtimeoutREG_DWORD
Default choice (UI): #2
LabelValue
1REG_DWORD = 1
5REG_DWORD = 5
10REG_DWORD = 10
15REG_DWORD = 15
30REG_DWORD = 30
60REG_DWORD = 60
120REG_DWORD = 120
240REG_DWORD = 240
480REG_DWORD = 480
720REG_DWORD = 720
1440REG_DWORD = 1440

Application

Microsoft 365 Apps / Office (Microsoft) — November 2026 templates

Official templates downloaded on November 12, 2026.