Install-Font
Description
Installs one or more fonts.
Requirements
PowerShell v5
Usage
- For each font to install:
- Get the COM object for the font's directory to enable querying the metadata.
- Get the Title metadata properties of the font file.
- If the font is an OpenType font, append '(OpenType)' to the registry property name; otherwise, append '(TrueType)'.
- Install the font and validate success.
 
Installs all found fonts located in the C:\Fonts folder:
.\\Install-Font.ps1 -Path C:\\Fonts
Installs the Times New Roman font located in the C:\Fonts folder:
.\\Install-Font.ps1 -Path C:\\Fonts\\times.ttf
Parameters
| Parameter | Alias | Required | Default | Type | Description | 
|---|---|---|---|---|---|
| Path | True | String | The path to the font file or folder of font files to install. | 
Output
- .\Install-Font-log.txt
- .\Install-Font-error.txt