Disable AutoDiscover
Verified with Microsoft 365/Office 5568.1000 — updated on September 4, 2026
Supported on: At least Windows Server 2008 R2 or Windows 7
Path in the GPO console
User Configuration\Administrative Templates\Microsoft Outlook 2016\Account Settings\Exchange Description
This policy setting allows you to disable AutoDiscover. If you enable this policy setting, you can select one or more of the following options to disable in the AutoDiscover feature. "Exclude the last known good URL” – Outlook does not use the last known good Autodiscover URL. "Exclude the SCP object lookup" – Outlook does not perform Active Directory queries for Service Connection Point (SCP) objects with Autodiscover information. "Exclude the root domain query based on your primary SMTP address" - Outlook does not use the root domain of your primary SMTP address to locate the AutoDiscover service. For example, you select this optionOutlook does not use the following URL: https://<smtp-address-domain>/autodiscover/autodiscover.xml. "Exclude the query for the AutoDiscover domain" - Outlook does not use the Autodiscover domain to locate the Autodiscover service. For example, Outlook does not use the following URL: https://autodiscover.<smtp-address-domain>/autodiscover/autodiscover.xml "Exclude the HTTP redirect method" - Outlook does not use the HTTP redirect method in the event it is unable to reach the AutoDiscover service via either of the HTTPS URLs: https://<smtp-address-domain>/autodiscover/autodiscover.xml or https://autodiscover.<smtp-address-domain>/autodiscover/autodiscover.xml. "Exclude the SRV record query in DNS" - Outlook does not use an SRV record lookup in DNS to locate the AutoDiscover service.
Registry
software\policies\microsoft\office\16.0\outlook\autodiscover Export Builder
BETAConfigure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.
These exports write the registry — this is not a managed GPO. ⓘ
.reg file
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Disable AutoDiscover
; State: Enabled
; Supported on: At least Windows Server 2008 R2 or Windows 7
[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\outlook\autodiscover]
"excludelastknowngoodurl"=dword:00000000
"excludescplookup"=dword:00000000
"excludehttpsrootdomain"=dword:00000000
"excludehttpsautodiscoverdomain"=dword:00000000
"excludehttpredirect"=dword:00000000
"excludesrvrecord"=dword:00000000
"excludeexplicito365endpoint"=dword:00000000
"disableautodiscoverv2service"=dword:00000000 More formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Disable AutoDiscover
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
$path = 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'excludelastknowngoodurl' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludescplookup' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpsrootdomain' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpsautodiscoverdomain' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpredirect' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludesrvrecord' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludeexplicito365endpoint' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'disableautodiscoverv2service' -Value 0 -Type DWord Intune XML
No direct Policy CSP / OMA-URI mapping for this policy. Use the Intune Remediation tab, or ingest the ADMX in Intune. Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Disable AutoDiscover
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludelastknowngoodurl' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludescplookup' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludehttpsrootdomain' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludehttpsautodiscoverdomain' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludehttpredirect' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludesrvrecord' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludeexplicito365endpoint' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'disableautodiscoverv2service' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Disable AutoDiscover
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
$path = 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'excludelastknowngoodurl' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludescplookup' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpsrootdomain' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpsautodiscoverdomain' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpredirect' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludesrvrecord' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludeexplicito365endpoint' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'disableautodiscoverv2service' -Value 0 -Type DWord SCCM scripts
# Exported from gporais.com
# Policy: Disable AutoDiscover
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# SCCM Configuration Item guidance:
# Create a Configuration Item of type "Setting: Script".
# Discovery script: use the Detection script below.
# Remediation script: use the Remediation script below.
# Compliance rule: the Discovery script output equals 'Compliant'.
# === Detection script ===
# Exported from gporais.com
# Policy: Disable AutoDiscover
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludelastknowngoodurl' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludescplookup' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludehttpsrootdomain' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludehttpsautodiscoverdomain' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludehttpredirect' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludesrvrecord' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'excludeexplicito365endpoint' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover' -Name 'disableautodiscoverv2service' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Disable AutoDiscover
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.
$path = 'HKCU:\software\policies\microsoft\office\16.0\outlook\autodiscover'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'excludelastknowngoodurl' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludescplookup' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpsrootdomain' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpsautodiscoverdomain' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludehttpredirect' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludesrvrecord' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'excludeexplicito365endpoint' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'disableautodiscoverv2service' -Value 0 -Type DWord Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.