Often we are asked if we can automate the creation or modification of new Outlook profiles, en-masse, for Exchange accounts... without user interaction. Typically, an Outlook profile (.prf) file, which is generated through the Office Customization Tool (OCT), can be used for most situations. However, there are two scenarios under which the use of .PRF files are not supported:
Exchange accounts - the .PRF file requires an Exchange server name to be hard-coded. This is normally acceptable for on-premises environments using Exchange 2010 and previous versions, but for Exchange 2013 and greater, along with for Exchange Online accounts, the server name contains a variable GUID that can change from time to time and from user to user.
Outlook 2016 - changes to how Exchange Autodiscover information is stored in parallel with an Outlook profile prevents the use of .PRF files to configure Exchange accounts in Outlook 2016. Outlook clients no longer connect to a server fully qualified domain name (FQDN) as they've done in all previous versions of Exchange. Using Autodiscover, Outlook finds a new connection point made up of the user's mailbox GUID + @ + the domain portion of the user's primary SMTP address.
While you can still use a PRF for your on-premises environments and Outlook 2013 or earlier versions, it is recommended that you use Autodiscover, which is supported for creating Outlook profiles in both on-premises and Exchange Online environments.
So, how can we automate the Outlook profile creation?
ZeroConfigExchange (ZCE) can be used to create new profiles for users with minimal user interaction. That is, the user does not have to enter any configuration data... only data that every user should already know (account name and/or password). ZCE is a registry setting that tells Outlook to create a new profile using the SMTP address from Active Directory and to then leverage Autodiscover. It's important to note that there are no supported tools for modifying an Exchange Online account. Again, ZCE is used as a way to automatically configure an Outlook profile for one or many users with Exchange Online or Exchange on-premises accounts. However, the underlying mechanism used to gather configuration data for your connection to Exchange is Autodiscover.
Implementing ZCE is easy. It can be added (through a login script) to the user's registry or as a group policy setting for all users. Here's how:
1. In the Windows Registry, navigate to the appropriate subkey for each version of Outlook that is in use:
For Outlook 2016: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover
As a policy: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Outlook\AutoDiscover
For Outlook 2013: HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\AutoDiscover
As a policy: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\15.0\Outlook\AutoDiscover
For Outlook 2010: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\AutoDiscover
As a policy: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\14.0\Outlook\AutoDiscover
2. Once the key is created, right-click in the right pane and click New, click DWORD Value and type in “ZeroConfigExchange” (without the quotes) and then press ENTER.
3. Finally, right-click ZeroConfigExchange, click Modify and then in the Value data box, type 1, and then click OK.
ZCE can be used in a couple of scenarios, with each behaving differently. It can be used in an initial Outlook Deployment for automatic profile creation, or when Outlook profiles already exist and a change requires a new profile to be created, such as a change to the target server. In either case, the user is not required to enter --or even know-- configuration details.
Initial Outlook Deployment
An initial Outlook deployment occurs when Microsoft Office or Microsoft Outlook is installed on the user’s workstation for the very first time. This means that no Outlook Profiles currently exist on the PC. As part of the deployment, ZCE could be configured via the Office Customization Tool (OCT). In this case, Outlook starts and the Outlook profile is automatically created during Outlook's first-run process. In a perfect case, there are no prompts. However, there may be a prompt for a username and password, depending on the Exchange Online configuration. Again, the user will not need to know nor need to enter any configuration details.
When Outlook Profiles Already Exist
This scenario would be necessary in cases where users need new profiles creates after having pre-existing profiles on the machine. This scenario requires additional registry keys be created (or pushed out to the user via GPO).
Note: Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.
For Outlook 2013/2016/2019:
Start Registry Editor. From the Start menu, type regedit.exe in the search box, and then press Enter.
Deploy ZeroConfigExchange key as mentioned above.
In Registry Editor, locate and then click the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\XX.0\Outlook (XX.0 will represent the version of Outlook version – 16.0 = 2016/2019, 15.0 = 2013).
Select DefaultProfile in the right pane and click Modify.
Change the value data to the new profile name that you want to create. Make sure that it is not the same as any of the old profiles stored on the machine.
Browse to HKEY_CURRENT_USER\Software\Microsoft\Office\XX.0\Outlook\Profiles (XX.0 will represent the version of Outlook version – 16.0 = 2016, 15.0 = 2013).
Right click Profiles and select New > Key.
Replace the value of the new key with the name of the profile that you provided in Step 6.
Note: For Outlook 2010, the location of the keys that need to be changed are located under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles.
It might be best to run gpupdate /force and reboot the machine to make sure that the settings stick and aren't overwritten by any existing polices. After the reboot, I’d recommend setting Outlook to prompt for profile to ensure that the new profile is being created at launch. Outlook should display the new profile created as the main profile for login at the splash screen if set to prompt for profile, otherwise if not set then Outlook should load directly into the new profile at startup.
This forces Outlook to create the new profile and the ZeroConfigExchange process to populate it with the additional profile data. If these registry settings are not set or created, Outlook uses the current default profile and will bypass ZCE. As mentioned earlier, there may be minimal interactions with the user depending on your environment. Again, in a perfect case, there are no prompts. However, there may be a prompt for a username and password, depending on your Exchange Online configuration.That's it for ZCE. Create new profiles with minimal user interaction. Plain and simple.