AutoArchive Settings: registry value doaging and 8 moreUserHKCU\software\policies\microsoft\office\16.0\outlook\preferences

Policy ID
L_AutoArchiveSettings
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 Outlook 2016 › Outlook Options › Other › AutoArchive

Registry

doaging

REG_DWORDUser
Checked
1
Unchecked
0
Element
Turn on AutoArchive
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\outlook\preferences]

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

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

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'doaging' -PropertyType DWord -Value 1 -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'doaging' -PropertyType DWord -Value 0 -Force | Out-Null

everydays

REG_DWORDUser
Enabled value
Depends on the option value
Element
Run AutoArchive every <x> days
Value type
REG_DWORD
Minimum value
1
Maximum value
60
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\outlook\preferences]

; Value names and types follow the ADMX. Replace <enter value> below with your own data
"everydays"=dword:<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\outlook\preferences" /v "everydays" /t REG_DWORD /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\outlook\preferences' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'everydays' -PropertyType DWord -Value '<enter value>' -Force | Out-Null

promptforaging

REG_DWORDUser
Checked
1
Unchecked
0
Element
Prompt before AutoArchive runs
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\outlook\preferences]

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

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

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'promptforaging' -PropertyType DWord -Value 1 -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'promptforaging' -PropertyType DWord -Value 0 -Force | Out-Null

deleteexpired

REG_DWORDUser
Checked
1
Unchecked
0
Element
Delete expired items (e-mail folders only)
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\outlook\preferences]

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

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

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'deleteexpired' -PropertyType DWord -Value 1 -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'deleteexpired' -PropertyType DWord -Value 0 -Force | Out-Null

archiveold

REG_DWORDUser
Checked
1
Unchecked
0
Element
Archive or delete old items
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\outlook\preferences]

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

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

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archiveold' -PropertyType DWord -Value 1 -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archiveold' -PropertyType DWord -Value 0 -Force | Out-Null

archivemount

REG_DWORDUser
Checked
1
Unchecked
0
Element
Show archive folder in folder list
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\outlook\preferences]

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

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

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archivemount' -PropertyType DWord -Value 1 -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archivemount' -PropertyType DWord -Value 0 -Force | Out-Null

archiveperiod

REG_DWORDUser
Enabled value
Depends on the option value
Element
Clean out items older than
Value type
REG_DWORD
Minimum value
1
Maximum value
60
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\outlook\preferences]

; Value names and types follow the ADMX. Replace <enter value> below with your own data
"archiveperiod"=dword:<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\outlook\preferences" /v "archiveperiod" /t REG_DWORD /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\outlook\preferences' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archiveperiod' -PropertyType DWord -Value '<enter value>' -Force | Out-Null

archivegranularity

REG_DWORDUser
Enabled value
Depends on the option value
Element
-
Options
ItemStored value
Months0
Weeks1
Days2
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\outlook\preferences]

; Options (use only one)
; Months
"archivegranularity"=dword:00000000
; Weeks
"archivegranularity"=dword:00000001
; Days
"archivegranularity"=dword:00000002
CMD
:: Options (use only one)

:: Months
reg add "HKCU\software\policies\microsoft\office\16.0\outlook\preferences" /v "archivegranularity" /t REG_DWORD /d 0 /f
:: Weeks
reg add "HKCU\software\policies\microsoft\office\16.0\outlook\preferences" /v "archivegranularity" /t REG_DWORD /d 1 /f
:: Days
reg add "HKCU\software\policies\microsoft\office\16.0\outlook\preferences" /v "archivegranularity" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Force | Out-Null

# Options (use only one)
# Months
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archivegranularity' -PropertyType DWord -Value 0 -Force | Out-Null
# Weeks
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archivegranularity' -PropertyType DWord -Value 1 -Force | Out-Null
# Days
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archivegranularity' -PropertyType DWord -Value 2 -Force | Out-Null

archivedelete

REG_DWORDUser
Checked
1
Unchecked
0
Element
Permanently delete old items
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\outlook\preferences]

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

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

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archivedelete' -PropertyType DWord -Value 1 -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\preferences' -Name 'archivedelete' -PropertyType DWord -Value 0 -Force | Out-Null