Home
Microsoft

 

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 Online accounts - this is because the .PRF file requires an Exchange server name to be hard coded. This is normally acceptable for on-premises environments, but 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

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)

 

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

 

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.

 

Note If you choose to deploy the setting using a Group Policy Object (GPO), see Managing Group Policy ADMX Files Step-by-Step Guide on the Microsoft TechNet Web site. For more information about how to use group policy, see the FAQ: Group Policy on the Microsoft TechNet Web site. The Office 2016 Administrative Template files (ADMX/ADML) are available from the Download Center.

 

ZCE User Experience

 

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:

  1. Exit Outlook.
  2. Start Registry Editor. From the Start menu, type regedit.exe in the search box, and then press Enter.
  3. Deploy ZeroConfigExchange key as mentioned above.
  4. 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).
  5. Select DefaultProfile in the right pane and click Modify.zce1.png
  6. 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.
  7. Click OK.
  8. 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).
  9. Right click Profiles and select New > Key.zce2.png

     

  10. Replace the value of the new key with the name of the profile that you provided in Step 6.
  11. Press Enter.
  12. Close Regedit.

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.

2 Comments
Occasional Contributor

Hello @G_Cozier :

Thanks for this great article!  Very helpful...one question we have though: what AD attribute is used by ZCE to determine the email address to use?  Is it just the property "mail", or "EmailAddress" or "targetAddress"?  Something else?

Occasional Visitor
We're migrating users from GroupWise to on-prem Exchange 2016 and Outlook 2016 (from Office 2016 Pro) on Server 2016 with Remote Desktop Services.  We use this ZeroConfigExchange configuration, and indeed the first time users launch Outlook it opens directly to their mailbox bypassing the wizard and creating an Outlook profile in the process. 
 
One issue we found, is the Send-To -> Mail Recipient feature is broken.  There is just a flicker of activity and then nothing happens. But if we use the Control Panel Mail app to create the Outlook profile manually, the Send-To Mail Recipient feature begins working (Outlook launches and opens a new email with the file attached). We've reproduced this at will, and even exported and compared the initial Outlook profiles, and they're different.  The manually-created profile contains 3 additional keys compared to the automatically created profile.
 
When we drop the creation of the profile key HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook (leaving the …\16.0\Outlook\Profiles branch empty), and keep the DefaultProfile value set to "Outlook", Outlook 2016 will still create the Outlook profile, and in the way that keeps the Send-To Mail Recipient feature working.
 
Additionally, our users are logging onto Server 2016 RDS for the first time, receiving new Windows profile settings, just prior to opening Outlook 2016 for the first time.  The Outlook 2016 app has been granted all its Defaults under Default Programs, and HKLM\Software\Clients\Mail  "(Default)" value is set to "Microsoft Outlook".