There are many instances when you may need to install a number of fonts to your Servers or Workstations.  What better way than to use SCCM or other deployment tools to get this task done.  This package contains a small powershell script that will inject any fonts you place in the fonts-to-be-installed folder.  You can then add this entire AddFonts folder to create an SCCM Package.

 

Step 1: 

Download the Package from us:  DOWNLOAD HERE!

Unzip and should have the following Folder Structure.

AddFonts

 

Step 2:

Add any fonts to the fonts-to-be-installed folder.  There are currently a few examples in the download, they can be deleted.

Step 3:

Use deployment tools such as Configuration Manager to Deploy with the command:

powershell.exe -executionpolicy Bypass -nologo -noninteractive -file .\Install_Fonts.ps1

 

 

Here is the powershell script being used in the Package if you wish to not download from us and create your own package:

$FONTS = 0x14
$Path=".\fonts-to-be-installed"
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.Namespace($FONTS)
$Fontdir = dir $Path
foreach($File in $Fontdir) {
if(!($file.name -match "pfb$"))
{
$try = $true
$installedFonts = @(Get-ChildItem c:\windows\fonts | Where-Object {$_.PSIsContainer -eq $false} | Select-Object basename)
$name = $File.baseName

foreach($font in $installedFonts)
{
$font = $font -replace "_", ""
$name = $name -replace "_", ""
if($font -match $name)
{
$try = $false
}
}
if($try)
{
$objFolder.CopyHere($File.fullname)
}
}
}