How to Deploy Fonts Using Intune: 3 Ways

In this blog post, we’ll delve into the font deployment process on Windows 10 and Windows 11 devices via Intune admin center. There are various deployment methods including the Win32 App method, using the Master Packager tool, and utilizing a PowerShell script.

To install a font on Windows devices, download the font file. You can download it from many websites, For example: Google Fonts. After you download the font file, Right-click on it, then select the ‘Install‘ option to make it available across the device for use in all applications.

When you install a font on the Windows device, it gets copied into C:\Windows\fonts directory. It will also create a registry entry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts location.

In the upcoming sections, our focus will be on deploying fonts using the Win32 App deployment method. For information on other deployment methods, please refer to the step-by-step guide: Simplify Fonts Deployment in Intune: 3 Methods.

How to deploy Fonts on macOS using Intune

Step-by-Step guide

Ways to Install Fonts on Windows Devices using Intune

There are multiple methods available for installing fonts on Windows devices using the Intune admin center. Let’s explore the various ways in the list below:

  1. Using Win32App Deployment Method – Best method for deploying font files on Windows devices involves using the Win32 App deployment method. While this method requires PowerShell scripts, it offers improved deployment reporting, and you can easily uninstall fonts from the user’s devices.
  1. Using Master Packager tool – Using Master Packager tool you can create and edit MSI files. We will use the community edition of this tool to create an MSI Installer file which will include our custom Font files. Then using Line of Business App option we will deploy this MSI file.
  1. Using a Powershell Script – This method involves creating a PowerShell script to deploy font files. The script essentially copies the font file to the C:\Windows\fonts directory. You can then deploy the script using Intune. For a step-by-step guide on deploying a PowerShell script, refer to the following guide: How to deploy a PowerShell script using Intune

Method 1 – Deploy Fonts Using Win32 App Method

The first method we are going to discuss involves using the Win32 App method on the Intune admin center. This approach requires PowerShell scripts to deploy font files on Windows 10 and Windows 11 devices. This is best option and my recommended method as well. Let’s check the steps:

STEP 1 – Download Font files

You have the option to download font files from the open-source fonts library provided by Google Fonts. Notably, a license is not necessary for utilizing Google fonts. To gain further insights into their licensing and usage, you can refer to the FAQs page on their website.

STEP 2 – Create an IntuneWin file

You can follow the steps below to create the .IntuneWin file, which will be used for the deployment. For more detailed information on creating an Intunewin file, refer to How to create an IntuneWin file.

  1. Create an empty folder named DeployFonts or any name you like
  2. Create a subfolder under DeployFonts and call it Fonts
  3. Copy all font files with .ttf or .otf extension to the Fonts folder
  4. Create two PowerShell scripts called InstallFonts.ps1 and Uninstallfonts.ps1 in the DeployFonts folder. [Copy and Paste the script code below into these files]
Prepare your setup files e.g.  fonts and powershell scripts for the deployment
Prepare your setup files e.g. fonts and Powershell scripts for the deployment

InstallFonts.ps1

<# 
.SYNOPSIS 
Install Fonts on users devices
 
.DESCRIPTION 
Below script will Install all fonts copied inside Fonts directory to a target device 
 
.NOTES     
        Name       : Font Installation Script
        Author     : Jatin Makhija  
        Version    : 1.0.0  
        DateCreated: 31-Jan-2023
        Blog       : https://cloudinfra.net
         
.LINK 
https://cloudinfra.net 
#>
#Get all fonts from Fonts Folder
$Fonts = Get-ChildItem .\Fonts
$regpath = "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts"
foreach ($Font in $Fonts) {
    $fontbasename = $font.basename
    If ($Font.Extension -eq ".ttf")  {$fontvalue = $Font.Basename + " (TrueType)"}
    elseif($Font.Extension -eq ".otf") {$fontvalue = $Font.Basename + " (OpenType)"}
    else {Write-Host " Font Extenstion not supported " -ForegroundColor blue -backgroundcolor white; break}
    $fontname = $font.name 
    if (Test-path C:\windows\fonts\$fontname)
    {
        Write-Host "$fontname already exists."
    }
    Else
    {
        Write-Host "Installing $fontname"
        #Installing Font
        $null = Copy-Item -Path $Font.fullname -Destination "C:\Windows\Fonts" -Force -EA Stop
    }
    Write-Host "Creating reg keys..."
    #Creating Font Registry Keys
    $null = New-ItemProperty -Name $fontvalue -Path $regpath -PropertyType string -Value $Font.name -Force -EA Stop    
}

UninstallFonts.ps1

<# 
.SYNOPSIS 
Uninstall Fonts from users devices
 
.DESCRIPTION 
Below script will Uninstall all fonts copied inside Fonts directory to a target device 
 
.NOTES     
        Name       : Font Uninstallation Script
        Author     : Jatin Makhija  
        Version    : 1.0.0  
        DateCreated: 31-Jan-2023
        Blog       : https://cloudinfra.net
         
.LINK 
https://cloudinfra.net 
#>
#Get all fonts from Fonts Folder 
$Fonts = Get-ChildItem .\Fonts
$regpath = "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts"
foreach ($Font in $Fonts) {
    $fontname = $font.name
    $fontbasename = $font.basename
    If ($Font.Extension -eq ".ttf")  {$fontvalue = $Font.Basename + " (TrueType)"}
    elseif($Font.Extension -eq ".otf") {$fontvalue = $Font.Basename + " (OpenType)"}
    else {Write-Host " Font Extenstion not supported " -ForegroundColor blue -backgroundcolor white; break} 
    #Remove Font from Windows folder
    Remove-Item C:\windows\fonts\$fontname -force -EA SilentlyContinue
    #Delete corresponding registry keys for the font
    Remove-ItemProperty -Path $regpath -Name $fontvalue -force -EA SilentlyContinue
}
  1. Download Microsoft Win32 Content Prep Tool. It’s a zip file, Extract its contents into a folder.
  1. Create an empty folder for example C:\output or anywhere you like.
  1. Repackage the DeployFonts folder to .intunewin file using IntuneWinAppUtil.exe which can be located in Microsoft Win32 Content Prep Tool.
.\IntuneWinAppUtil.exe -c "C:\DeployFonts\" -s InstallFonts.ps1 -o C:\output
Create .Intunewin file
Create .Intunewin file
  1. Once the command is executed successfully, you can check c:\output folder where .intunewin file is created. We will use this file later for creating Windows app (win32) deployment.
Install fonts .intunewin file created successfully
Install fonts .intunewin file created successfully

STEP 3: Create Win32 App Deployment to Deploy Fonts

Now, we have .Intunewin file created, Let’s check the deployment steps:

  1. Login on Microsoft Intune admin center
  2. Click on Apps and then click on All Apps.
  3. Click on + Add and Select Windows app (Win32) from the app type.

App Information

Click on “Select app package file” and browse to .Intunewin file. Provide Information in below mandatory fields. The rest of the fields are optional but can be useful for application documentation and troubleshooting issues.

  • Name – Provide a unique name of the application. This name will show up on the Company portal app. For example: Fonts Installation
  • Description – Provide a useful description.
  • Publisher – Provide Publisher information. For example: Microsoft.
App Information
App Information

Program Tab

Provide the Install command, uninstall commandInstall behavior, Device restart behavior. Click on Next to proceed.

  • Install command:  powershell.exe -Executionpolicy Bypass -File .\Installfonts.ps1
  • Uninstall command: powershell.exe -Executionpolicy Bypass -File .\Uninstallfonts.ps1
  • Install behavior: System
  • Device restart behavior: No specific Action
Provide Install and Uninstall commands for Installation of fonts using Intune
Program Tab

Requirements Tab

You can specify the requirements that devices must meet in order to deploy the app. If your devices are a mix of 32-bit and 64-bit types, then check both the boxes for 32-bit and 64-bit in the Operating system architecture drop-down. Else, just go with 64-bit.

  • Operating System Architecture: 64-bit
  • Minimum operating system: Select the minimum OS requirement for this deployment.

Detection Rules

Select Manually configure detection rules and click on +Add to add a detection rule.

  • Rules Format: Select Manually configure detection rules
  • Rule Type: File
  • Path: Provide the location of C:\windows\fonts and the name of the font file to detect.

Create one rule for each font file to detect all fonts under C:\windows\fonts directory. For example:

  • Rule type: File
  • Path: C:\windows\fonts\
  • File or folder: Alata-Regular.ttf
  • Detection Method: File or Folder exists.
Configure detection rules for font's deployment using Intune admin center
Configure detection rules for font’s deployment using Intune admin center
  • As I will be deploying 4 font files, four detection rules will be required to detect each font file to confirm the Installation.
Detection rules
Detection rules

Assignments Tab

Click on Add group to add an Azure AD group containing users or devices. You can also click on Add all users or Add all devices.

Assignment
Assignment

Review + Create

Review the deployment and click on Create to start the deployment process.

STEP 4 – Monitoring Fonts Deployment Progress

You can follow below steps to monitor the installation:

From the Microsoft Intune admin center > Apps > All apps. Click on the deployment and check Overview page which will show the deployment status.

Method 2 – Use Master Packager Tool to Deploy Fonts

The Master Packager Tool is an application packaging tool used to Create and Edit Microsoft Windows Installer (MSI) files. In the following steps, we will learn how to package custom font files into the .MSI installer file. Subsequently, we can deploy this MSI installer to install our custom font files on both Windows 10 and Windows 11 devices.

This method is ideal if you prefer not to use PowerShell scripts and seek a straightforward way to deploy font files. Additionally, it offers the flexibility to easily edit the MSI file, allowing you to add or remove font files from the package.

For detailed information and a step-by-step guide on how to deploy fonts via Intune using the Master Packager Tool, refer to the link: Simplify Fonts Deployment in Intune: 3 Methods.

Method 3 – Using Powershell Script to Deploy Fonts

The last method involves deploying font files using a PowerShell script through the Intune admin center. Follow the steps below:

Sync Intune Policies

The device check-in process might not begin immediately. If you’re testing this policy on a test device, you can manually kickstart Intune sync either from the device itself or remotely through the Intune admin center.

Alternatively, you can use PowerShell to force the Intune sync on Windows devices. Another way to trigger the Intune device check-in process is by restarting the device.

End-user Experience

After the deployment is completed successfully, Fonts will be installed on user’s devices silently in the background. Users may see a pop-up notification related to the deployment, this is configurable using “Show all toast notifications” setting.

Show all toast notifications option in App deployment package on Intune admin center
Show all toast notifications option in App deployment package on Intune admin center

1. Verifying fonts installation from C:\windows\fonts directory

As we have deployed below 4 fonts on the devices, Let’s verify if the fonts are installed on target devices successfully. Login on one of the target devices and follow the below steps:

  • Go to the folder C:\windows\fonts and check the font files.
  • Alata-Regular.ttf
  • Monda-Bold.ttf
  • Monda-Regular.ttf
  • Paprika-Regular.ttf
Fonts deployed successfully from Intune admin center to target devices
Fonts deployed successfully from Intune admin center to target devices

2. Verifying fonts Installation using Registry Editor

You can also verify the installation of fonts from the registry editor, by following below steps:

  • Press Win + R to open a Run dialog box.
  • Type regedit and press Enter.
  • Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts and search for the Font names on the right-hand side to make sure the entries for the deployed fonts exist.
Verify fonts installation using Windows registry editor
Verify fonts installation using Windows registry editor

3. Verify the fonts Installation using Microsoft Word

You can launch one of the Microsoft Office applications e.g. Word and confirm if the font is showing in the list. This will also confirm the font has been deployed successfully via Intune.

Verify fonts installation using Microsoft Word application
Verify fonts installation using Microsoft Word application

4. Verify the fonts Installation using IntuneManagementExtension Logs file

You can verify fonts installation using IntuneManagementExtension log file as well. Go to C:\ProgramData\Microsoft\IntuneManagementExtension\Logs and open the most recent IntuneManagementExtention.log file.

Search for the app name or PowerShell script name (Installfonts.ps1) to find the log related to Font Installation deployment.

Verify the fonts Installation using IntuneManagementExtension Logs file
Verify the fonts Installation using IntuneManagementExtension Logs file

How to Uninstall fonts using Intune

Using the same fonts deployment created in previous steps, we can also remove these fonts from the devices. We have already configured powershell.exe -Executionpolicy Bypass -File .\Uninstallfonts.ps1 command in Program tab while creating the deployment.

Please note you can uninstall the same fonts that have been deployed using Intune as the font files are contained in .intunewin file. As we deployed 4 fonts using intune Alata-Regular.ttf, Monda-Bold.ttf, Monda-Regular.ttf, Paprika-Regular.ttf, we can uninstall these fonts using below steps:

  • From Microsoft Intune admin center, Click on Apps on the left-hand side.
  • Click on All apps.
  • Click on your fonts deployment app.
  • Click on Properties under Manage.
  • Scroll down to find Assignments and click on Edit next to it.

To Uninstall these fonts from the devices, simply remove the devices from Required and Include it in Uninstall section.

Uninstall fonts using Intune admin center
Uninstall fonts using Intune admin center

Leave a Comment