Deploying Office ADMX Files to the Central Store

Problem:  Can I deploy a central store and the ADMX files for Microsoft Office?

Solution:  So I tasked myself with deploying the Microsoft Office ADMX files recently and honestly, it was a pretty simple exercise but again seemingly no information on it.  So here’s my write up;

First you have to create the central store for all the other settings.  Here’s how I did it:

To create the GPO Central Store you must copy the folder “C:\Windows\PolicyDefinitions” into the folder “C:\Windows\SYSVOL\sysvol\YOURDOMAIN.local\Policies\PolicyDefinitions”. 
Just double check this path is correct in your environment, my environment is Windows Server 2012R2 and this path works for me. 
Here is a function to I wrote so as I deploy my domain controller this is called and the Central Store is created for me.

   1: <#
   2: Script to create a GPO Central Store after deployment
   3:  
   4: Author:  Jonathan of www.deploymentshare.com
   5: Version: 1.0.0
   6:  
   7: #>
   8: Function Create-CentralStore   
   9:     {   
  10:         $Destination = "C:\Windows\SYSVOL\sysvol\YOURDOMAIN.local\Policies\PolicyDefinitions"   
  11:         $Source = "C:\Windows\PolicyDefinitions"   
  12:         if (!(Test-Path -path $Destination )) { $null = New-Item -ItemType Container -Path $Destination -Force }   
  13:         Robocopy $Source $Destination /S   
  14:     }   
  15:    
  16: Create-CentralStore

The central store contains a number of .ADMX files and a folder which contains .ADML files.  The ADML files are needed otherwise you’ll receive configuration errors when attempting to use group policy.  You can confirm that the central store is set up correctly by cracking open Group Policy and then in turn a Group Policy object.  Navigate down to ‘Administrative Templates either on Computer or User side and you will see in the RHS column that the definitions have been retrieved from the central store:

CS

Once the Central Store is created you need to download the ADMX files for the version of Microsoft Office you use in your environment.  Here are some links for you:

http://www.microsoft.com/en-gb/download/details.aspx?id=18968 – Office 2010 ADMX
http://www.microsoft.com/en-gb/download/details.aspx?id=35554 – Office 2013 ADMX
http://www.microsoft.com/en-us/download/details.aspx?id=49030 – Office 2016 ADMX

Each link will provide you with a x86 and a x64 downloadable .exe file.  The one you require depends on the the version of office you require to manage via GPO.  In our production environments we have one version of Office, we install the x86 version of Office as advised for most situations by Microsoft. When you run the exe you will be asked to suggest a folder to extract the files to like so…

image   image

image

Now you’ll have a couple of folders inside the extract but we’re only interested in the ADMX folder.  Inside here are the ADMX files we need and the language packs, I have deleted all language folders except en-us and I am now left with 13 admx files and an en-us folder.  these are the only files that we need to deploy so all the rest can be deleted.  As with the Central Store creation above, you’re left with several ADMX files and then a number of .ADML files inside the en-us folder.

For the sake of completeness, I downloaded both architectures for both 2010 and 2013, extracted, then removed all unneeded files and I am now left with the following folders

Office2010x86
Office2010x64
Office2013x86
Office2013x64

This way, when deploying a domain controller I can chose which one to implement on it depending on where I am

I wrote a simple function which looks like this:

   1: Function Import-ADMX   
   2:     {   
   3:         $Destination = "C:\Windows\Sysvol\sysvol\YOURDOMAIN.local\Policies\PolicyDefinitions"   
   4:         $Source = .\ADMX\Office2010x86   
   5:         #$Source = .\ADMX\Office2013x86   
   6:         #$Source = .\ADMX\Office2013x86   
   7:         #$Source = .\ADMX\Office2013x64   
   8:         if (!(Test-Path -path $Destination )) { $null = New-Item -ItemType Container -Path $Destination -Force }   
   9:         Robocopy $Source $Destination /S  
  10:     }  
  11:     
  12: Import-ADMX

Obviously you’re going to have to edit the source folders for your environment, but this will do the following things:

1. Set the destination folder, this is the central store folder
2. Set the source folder, you’ll need to edit this to represent your environment
3. Test for the PolicyDefinitions folder in the default location for the central store, if it isn’t there, create it.
4. Copy in the ADMX & ADML files for the version of Office you use in your environment.

This can be run as a deployment step PowerShell script (which is what I am doing) and must be on the primary domain controller.  To test if this has worked properly crack open a GPO and see if you can see the MS Office items:

admx

As you can see from this my deployment of the Office 2013 ADMX files was successful and they are sitting in a central store.  Happy days!

Jonathan