Skip to content
Home » Word Standard Template with Intune (Normal.dotm)

Word Standard Template with Intune (Normal.dotm)

It is very important to comply with the CI/CD in an organization, which means, among other things, that new Word documents have to come with the right fonts, sizes and colors. To do this, replace the Normal.dotm file in the "C:\Users\%username%\AppData\Roaming\Microsoft\Templates" directory. In order to distribute the Normal.dotm file with Intune, I have prepared a PowerShell script, which you can easily distribute as a Win32 app with Intune.

PowerShell to distribute the Normal.dotm

The script creates the template folder locally in the user's AppData and then copies the Normal.dotm into it. If the folder already exists, it doesn't matter.
After execution, the script creates a validation file, which is also in the AppData of the user and contains the version.

$PackageName = "Normal-template" $Version = "1" $Path_4netIntune = "$Env:Programfiles\4net\EndpointManager" Start-Transcript -Path "$Path_4netIntune\Log\$PackageName-$env:USERNAME-install.log" -Force try{ New-Item -Path "$env:APPDATA\Microsoft\Templates" -ItemType "Directory" -Force Copy-Item 'Normal.dotm' -Destination "$env:APPDATA\Microsoft\Templates\" -Recurse -Force New-Item -Path "$env:localAPPDATA\4net\EndpointManager\Validation\$PackageName" -ItemType "file" -Force -Value $Version }catch{ Write-Host "_____________________________________________________________________" Write-Host "FEHLER" Write-Host "$_" Write-Host "_____________________________________________________________________" } Stop-Transcript
Code language: PowerShell (powershell)

Create and upload Win32 app

You need the current "Microsoft Win32 Content Prep Tool".
You then create the Intunewin file as follows, where the path is the location where the installation file and the package are located.

intunewin for normal.dotm deployment

You will then find your install.intunewin file in the specified folder. For this, in turn, we now create a new Win32 app in the Endpoint Manager under "Apps > Windows" +Add.

add wib32 app

Here you upload the create install.intunewin file and assign the name, the description, the publisher and optionally an icon.

Intune App Normal.dotm

In the program settings you store the two commands and the installation behavior "User".

install command%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -executionpolicy bypass -command .\install.ps1
uninstall command%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -executionpolicy bypass -command .\uninstall.ps1
Normal.dotm install and uninstall command

You have to define something in the requirements, but there aren't any special ones.

system requirements

As a "Detection Rule" I have prepared the file "check.ps1".

Normal.dotm detection script rule

There are no dependencies and at the end you can still assign and create the package.

As soon as Intune installs the package, i.e. has replaced Normal.dotm, the user has the new Word template.

Attention: If you use special fonts in your template, these must also be installed on the device. I have documented how you can do this with Intune here: Install fonts with Intune

Update Normal.dotm

If you want to distribute a new version of Normal.dotm, you only have to increase the version in the second line in "install.ps1" and "check.ps1".

$PackageName = "Normal-template" $Version = "1" # Change this number for updates
Code language: PowerShell (powershell)

20 thoughts on “Word Standard-Vorlage mit Intune (Normal.dotm)”

  1. Moin Florian,

    in der uninstall.ps1 wird die NormalEmail.dotm gelöscht. Ist das ein Fehler?
    oder kapier ich gerade nicht warum.

    hast du ein "buy me a coffee"?

    Grüße aus Spanien

      1. Hey Florian,

        bestimmt muss beim uninstall Befehl auch uninstall.ps1 aufgerufen werden und nicht install.ps1 oder?

        Gruß Henning

  2. Hey Florian,

    was muss ich alles anpassen, wenn ich das auch für Excel und PowerPoint machen möchte? (Bezogen auf Pfade und Dateinamen, den Rest kriege ich hin)
    Oder noch besser, hast du zufällig ein Script, in dem auch eine Excel und PowerPoint-Vorlage (quasi als Gesamtpaket) verteilt wird?

    VG Gab

      1. Servus Florian,

        ich weiß bloß, dass es bei PowerPoint eine default_theme punkt thmx-Datei gibt - daher meine Frage.
        Bezüglich Excel habe ich auch nichts gefunden.

        VG Gab

  3. Pingback: Mail template with Intune (NormalEmail.dotm) | scloud

  4. Hello,
    Thank for this, really helpful.
    The installation is marked as failed although it is installed.
    What could be the issue?

    1. Perhaps something with the detection. Do you see the validation file with a version number in it?
      Path: C:\Users\florian.salzmann\AppData\Local\4net\EndpointManager\Validation\Normal-template

  5. Pingback: Manage Office Templates with SharePoint and Intune | scloud

  6. Hi Florian,
    ich habe es versucht die Vorlage wird bei mir auch verteilt bedeutet sie ist unter dem Pfad zu finden aber leider erscheint es nicht in Word selbst.

    hast du eine Idee ?

  7. Hi, this is great! It works perfectly - with one strange exception.
    The Normal template is installed (I see this when I open Word). Intune says the app is installed correctly. But: in the folder C:\Program Files\4net\EndpointManager\Validation there is no validation file.

    I have not made any changes in any of the scripts, and I have uploaded (and double checked) the check.ps1 file to Intune.

    Since everythnig works, I guess this will only be an issue when/if I want to update the template, but I find it strange (and a little annoying 🙂 )

    I have also used your equally great tutorial on how to install company fonts. This also works perfectly, but in this case, the validation file "Company-Fonts" in the folder C:\Program Files\4net\EndpointManager\Validation is actually there, showing the correct version number.

    1. Hi Marten, happy to hear the solutions work for you!

      Regarding the Validation file, cause the Normal.dotm is in the User context, the validation file is as well.
      You'll find it at: C:\Users\%username%\AppData\Local\_MEM\Validation\Normal-template

  8. Great article! it maybe good to note that the actual applications must be closed before the template can actually be replaced

Leave a Reply

Your email address will not be published. Required fields are marked *