1 minute read

Recently a customer using Microsoft Intune requested to deploy a TrueType font required by one of their line of business apps. Because Intune does not offer a native solution to deploy fonts it was quite clear that a PowerShell script or Intune Win32 app should do the trick. Note that the mentioned PowerShell scripts can also be used for app deployments with Configuration Manager (MEMCM).

How to install a font programmatically?

There seem to be multiple options depending on the operating system version. I’ve tested this with Windows 10 1909. And broke it down to the following steps:

  • Copy the font to the “C:\Windows\Fonts” folder
  • Create a registry key which points to the filename of the *.ttf or *.otf font copied to the Windows font path

How to install a font with Intune?

To get the font to Windows 10 devices I created a PowerShell script which copies the font files to the windows-fonts folder and creates the required registry key.

Deploying the PowerShell script as Intune Win32 app has the advantage that we can link the font as a dependency if any app requires a specific font. Additionally we can detect and uninstall the font if needed.

To uninstall the font I created an uninstall script which reverts the steps mentioned above.

Both scripts are available on GitHub.

Combining Intune Win32 apps and a PowerShell script

  1. Prepare a folder structure with your font and the installfonts.ps1 script
    ┣ fonts/
    ┃ ┗ place your fonts files (*.ttf / *.otf) in this directory
    ┣ installfonts.ps1
    ┗ uninstallfont.ps1
  2. Create a new intunewin package with the Microsoft-Win32-Content-Prep-Tool and wrap the whole DeployFont folder:

  3. Add a new win32 app in Intune & upload the intunewin package

  4. Program settings: Intune install font

    Setting Value
    Install command %windir%\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Bypass -file "installfonts.ps1"
    Uninstall command %windir%\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Bypass -file "uninstallfont.ps1"
    Install behavior System
  5. Detection Rule: Intune install font Add detection rules which match the file names of your *.otf and *.ttf files within the C:\Windows\Fonts\ folder.

  6. Assign the app as available or required

Targeted Machines

On a Windows 10 machine enrolled in Intune we can now test the installation:

And find the font successfully installed:

Also note that a very basic log gets created under ‘C:\Windows\Temp\InstallFont.log’.

Final words

Hoping this guide helps you to deploy font files to Windows 10 devices and saves you some time. The mentioned PowerShell scripts could also be used with Configuration Manager (MEMCM).

Happy Font-Deployment.