If you manage Exchange or support Exchange Online users, you may need to retrieve the AutoDiscover XML response. You can use the Test E-mail AutoConfiguration option in Outlook or the AutoDiscover tests in Microsoft Remote Connectivity Analyzer to retrieve the AutoDiscover response. The good news is you can also use a PowerShell one-liner or function to retrieve it.

Here’s a one-liner that uses the Outlook.Application COM object. It requires Outlook.

(New-Object -comobject Outlook.Application).session.autodiscoverxml

Add Get-AutoDiscoverXML function to your PowerShell profile or script

You can also add it to your PowerShell profile and invoke it using a shorter or easier to remember function name at any time. Add the following function to your PowerShell profile.

Function Get-AutoDiscoverXML {
$OutlookApplication = New-Object -comobject Outlook.Application

Now start PowerShell and you can retrieve the AutoDiscover response at any time using Get-AutoDiscoverXML.

Retrieving AutoDiscover XML as an XML document

When you use the above code, you get the AutoDiscover XML response as a string. It’s a lengthy string that you can paste in a text editor (Notepad++ is much better suited to scripting/writing and reviewing code and XML docs like this AutoDiscover response). In PowerShell, you’ll see the response quickly fill up your screen and the formatting isn’t conducive to reading. Of course, if you know the AutoDiscover XML schema and what you’re looking for, it may work for you.

If you’re used to PowerShell objects, tab completion and tabbing through an object’s properties, you may find the following method useful. It retrieves the AutoDiscover response as an XML doc.

$autodiscoverxml = [xml](New-Object -comobject Outlook.Application).session.autodiscoverxml

After retrieving the XML doc, try tabbing through it. For example:

$autodiscoverxml.Autodiscover.Response.Account.Protocol | ? {$_.type -eq “mapihttp”} | fl *


Maximum number of In-Place Holds on a mailbox in Exchange 2013 and Office 365

September 23, 2015

Since the early days of In-Place Hold, the number floating around (and documented) is a maximum of five In-Place Holds before Exchange holds all content, but it’s incorrect. In Exchange 2013 and Exchange Online, you can use In-Place Hold to place messages (and other items, including archived Skype for Business/Lync conversations) on hold indefinitely or […]

More →

eDiscovery Limits and Throttling Policies in Exchange Server and Office 365

September 17, 2015

In Exchange 2013 and Exchange Online, In-Place eDiscovery allows you to search a large number of mailboxes. Although the searches are performed against the indexes built by Exchange Search, they can potentially consume significant system resources. In on-premises deployments, this generally happens in control of or with the knowledge of Exchange admins, who can and […]

More →

Archiving auto-forwarded messages in Exchange Online and Exchange Server

August 12, 2015

Microsoft Exchange can now preserve automatically forwarded messages if user is placed on Litigation Hold or In-Place Hold. Over the last few years, the Information Protection team has done a great job of implementing Compliance features in Exchange (and Office 365) such as Litigation Hold and In-Place Hold to preserve messages, eDiscovery to search and […]

More →

Issue with Symantec Enterprise Vault and Exchange 2013 fixed in Exchange 2013 CU8

March 19, 2015

Microsoft released Exchange Server 2013 Cumulative Update 8 (CU8) yesterday. See KB 3030080: Cumulative Update 8 for Exchange Server 2013 for more details, including a list of fixes included in CU8. Symantec has documented an issue with Symantec Enterprise Vault™, Symantec’s on-premises archiving solution, and Exchange 2013 CU6 and CU7. The corresponding Microsoft KBA Symantec […]

More →

Disable automatic email forwarding in Office 365 and Exchange Server

March 2, 2015

Exchange Server and Exchange Online allow your users to automatically forward email to an external email address. Over the years, I’ve written about forwarding email to an external email address in Exchange, the risks of forwarding work email to personal email accounts and listing users with email forwarding enabled. Figure 1: Automatic email forwarding options […]

More →

Archiving in the cloud: Recover and restore Inactive Mailboxes in Exchange Online

February 18, 2015

An employee leaves the organization and your organization requires that mailboxes be preserved for a certain period, ranging anywhere from two to seven years or more, to meet business or regulatory compliance requirements, including eDiscovery. Mailbox content should be preserved and discoverable using In-Place eDiscovery during this period. Exchange Online allows you to use Inactive […]

More →

Apple OS X 10.10.2 and iOS 8.1.3 Updates

January 29, 2015

Apple has released OS X Yosemite 10.10.2 and iOS 8.1.3 which fix a bunch of Exchange and Microsoft platform issues. Interestingly, Apple has started adding an Enterprise content section to its update articles. For OS X 10.10.2: From DL1785, OS X Yosemite 10.10.2 Update: Enterprise content For enterprise customers, this update: Improves performance for browsing […]

More →

Is GoGo’s use of a fake SSL certificate a Man-In-The-Middle attack?

January 22, 2015

Adrienne Porter Felt, an engineer on Google’s Chrome security team, recently found in-flight WiFi service provider GoGo using a fake certificate for Google.com and tweeted the following, with a screenshot. hey @Gogo, why are you issuing *.google.com certificates on your planes? pic.twitter.com/UmpIQ2pDaU — Adrienne Porter Felt (@__apf__) January 2, 2015 If you’re a GoGo customer, […]

More →

Net neutrality and how ISPs can impact your email security

November 18, 2014

There was a time ISPs limited themselves to providing layer 3 connectivity. You got a connection, and if the link was up and your computer or network configured correctly for Internet Protocol (IP) communication, you could send and receive TCP/IP packets over that link. The ISP controlled the bandwidth, which is the maximum rate at […]

More →