Home About Contact Latest Articles Close

Deploy Word and Powerpoint Default Templates using Intune

Author: Ofir Gavish

Introduction

If you want to deploy or update Word and Powerpoint Templates across your organization using Intune you've come to the right place.

In this post I'm gonna show you how to do that using Intune Platform Scripts and Azure Storage Account static web content

You can use any publicly accessible storage like S3 bucket, Azure Storage account, etc.

I'm using Azure Storage Account static web content for my Cloud Storage needs and will cover creating one in this post.

Create an Azure Storage Account

In the Azure Portal, search for storage account in the top search bar.

click on create:

Create Azure Storage Account

In the Basics tab, select your Subscription, a Resource Group (or create a new one), give it a name, select a region thats best for you, and configure the other settins like in this screenshot:

Create Azure Storage Account

Click on Next, keep the defaults in the other tabs and click on Review + create and then on Create.

When the stroage account gets created, click on Go to resource to configure the storage account.

Configure static website on Storage Account

In your storage account page, click on Data Management then on Static website on the left:

Configure Azure Storage Account static website

Click on Enable and enter the details like in this screenshot:

Configure Azure Storage Account static website

Then click on Save, after a few seconds this will show up:

Configure Azure Storage Account static website

Now that you have your Primary endpoint copy it.

Now if you want to use this to host a website, you can put your html (css + js supported as well) files there and access your website, we are going to configure this as a anonymous access public storage so your endpoints can download the templates from the blob storage

We'll need to configure two settings so this will work, one is to enable Allow Blob anonymous access:

Click on Settings then on Configuration and enable the blob anonymous access:

Configure Azure Storage Account static website

Number two is to change the Anonymous access level on the $web conainter (not needed if you connect and use a custom domain which will not be covered in this post):

I like to use the Storage browser but you can also work with the Containers option under Data storage.

Click on Storage browser on the left, then on Blob containers and you'll see your $web container:

Configure Azure Storage Account static website

Click on the 3 dots on the right side of the $web folder and choose Change access level:

Configure Azure Storage Account static website

Select Container and click on Ok:

Configure Azure Storage Account static website

Now we're ready to add a directory and upload our template files:

Click on your $web container and then on Add Directory:

Configure Azure Storage Account static website

Give it a name (note that it's case sensitive!), I'll call it "files" for this example and click on Ok:

Configure Azure Storage Account static website

Click on Upload and select your files:

Configure Azure Storage Account static website

If you dont upload any file to the directory you created before browsing away from the page it will be removed.

Upload your Word and Powerpoint Templates here

When it's done uploading click on your file, and copy the URL:

Configure Azure Storage Account static website

Try to paste this URL into a new tab, the file should start downloading

We'll use the URLs of the two files to edit in the PowerShell Script.

Get your script ready!

Download the Script from my Github repo

Open the script in the editor of your choice - personally, I use both PowerShell ISE and Visual Studio Code. I like to mix it up, because why settle for one when you can drown in the chaos of two editors, all while your code slowly unravels and you start questioning if this is the real world... or just a bug in the matrix?

Glitch In the Intune Matrix

Edit the two lines in the #Variables section, paste the url's of your template files you copied from the storage account before this step.

Intune Portal Time!

Deploy this script as a Platform Script and assign it to the group you want to deploy it to.

Configure the settings like in this screenshot:

Configure Azure Storage Account static website

Always start deploying new policies and scripts on a few endpoints first, after you verify it works successfuly and as intended then assign it to more devices

Conclusion

By following these steps, you have:

That's it for this post, just one more thing, in the script I'm using the PowerShell module I created - which you can read about in this post