Trusted Location #11: registry value path and 3 more (excel\security\trusted locations\location11)UserHKCU\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11

Policy ID
L_TrustedLoc11
Scope
User Configuration
Supported on
At least Windows Server 2008 R2 or Windows 7
Source
Microsoft 365 Apps / Office Administrative Templates (version 5568.1000)
Category
Microsoft Excel 2016 › Excel Options › Security › Trust Center › Trusted Locations

Registry

path

REG_EXPAND_SZUser
Enabled value
Depends on the option value
Element
Path:
Value type
REG_EXPAND_SZ
Expandable string (REG_EXPAND_SZ)
true
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11]

; Value names and types follow the ADMX. Replace <enter value> below with your own data
; hex(2) and hex(7) data must be written as hexadecimal (UTF-16LE)
"path"=hex(2):<enter value>
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data

reg add "HKCU\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11" /v "path" /t REG_EXPAND_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data

New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Name 'path' -PropertyType ExpandString -Value '<enter value>' -Force | Out-Null

date

REG_SZUser
Enabled value
Depends on the option value
Element
Date:
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11]

; Value names and types follow the ADMX. Replace <enter value> below with your own data
"date"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data

reg add "HKCU\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11" /v "date" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data

New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Name 'date' -PropertyType String -Value '<enter value>' -Force | Out-Null

description

REG_SZUser
Enabled value
Depends on the option value
Element
Description:
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11]

; Value names and types follow the ADMX. Replace <enter value> below with your own data
"description"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data

reg add "HKCU\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11" /v "description" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data

New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Name 'description' -PropertyType String -Value '<enter value>' -Force | Out-Null

allowsubfolders

REG_DWORDUser
Checked
1
Unchecked
0
Element
Allow sub folders:
Value type
REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11]

; Options (use only one)
; Checked
"allowsubfolders"=dword:00000001
; Unchecked
"allowsubfolders"=dword:00000000
CMD
:: Options (use only one)

:: Checked
reg add "HKCU\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11" /v "allowsubfolders" /t REG_DWORD /d 1 /f
:: Unchecked
reg add "HKCU\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11" /v "allowsubfolders" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Force | Out-Null

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Name 'allowsubfolders' -PropertyType DWord -Value 1 -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security\trusted locations\location11' -Name 'allowsubfolders' -PropertyType DWord -Value 0 -Force | Out-Null