Deploying Office Document Templates with Intune and Group Policy

26 Jul

With a move to O365 and AAD, some of the old GP features were missing a little, and pushing out office templates to all users was one of them, but with a bit of registry changing, this should be possible.

In short, the office document template files are stored in SharePoint in a document library, as .dotx, .xltx and .potx.

Then you can change the office settings to show the personal templates by default and point them to your SharePoint location with some basic registry changes.

For Intune, simply deploy this PowerShell script to all devices:

Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-Location ZoneMap\Domains
New-Item tennant.sharepoint.com
Set-Location tennant.sharepoint.com
New-ItemProperty . -Name https -Value 2 -Type DWORD

$ie = New-Object -com InternetExplorer.Application 
$ie.visible=$false
$ie.navigate("https://tennant.sharepoint.com/branding/templates") 
start-sleep 10

New-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\Word\Options -Name PersonalTemplates –Force -Value "\\[email protected]\DavWWWRoot\Branding\Templates" -PropertyType "ExpandString"
New-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\PowerPoint\Options -Name PersonalTemplates –Force -Value "\\[email protected]\DavWWWRoot\Branding\Templates" -PropertyType "ExpandString"

New-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\Word\Options -Name officestartdefaulttab –Force -Value 1 -PropertyType "DWord"
New-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\PowerPoint\Options -Name officestartdefaulttab –Force -Value 1 -PropertyType "DWord"

For Group Policy, I set the following as a login script for the user and then set the registry items in the GPO:

Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-Location ZoneMap\Domains
New-Item tennant.sharepoint.com
Set-Location tennant.sharepoint.com
New-ItemProperty . -Name https -Value 2 -Type DWORD

$ie = New-Object -com InternetExplorer.Application 
$ie.visible=$false
$ie.navigate("https://tennant.sharepoint.com/branding/templates") 
start-sleep 10

Enjoy!