Skip to content

Install-Font

SYNOPSIS

Installs a font in the system.

SYNTAX

__AllParameterSets

Install-Font [-Path] <string[]> [[-Scope] <string[]>] [-Recurse] [-Force] [-WhatIf] [-Confirm]
 [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

Installs a font in the system, either for the current user or all users, depending on the specified scope. If the font is already installed, it can be optionally overwritten using the -Force parameter. The function supports both single file installations and batch installations via pipeline input.

Installing fonts for all users requires administrator privileges.

EXAMPLES

EXAMPLE 1

Install-Font -Path C:\FontFiles\Arial.ttf

Output:

Arial.ttf installed for the current user.

Installs the font file Arial.ttf for the current user.

EXAMPLE 2

Install-Font -Path C:\FontFiles\Arial.ttf -Scope AllUsers

Output:

Arial.ttf installed for all users.

Installs the font file Arial.ttf system-wide, making it available to all users. This requires administrator rights.

EXAMPLE 3

Install-Font -Path C:\FontFiles\Arial.ttf -Force

Output:

Arial.ttf reinstalled for the current user.

Installs the font file Arial.ttf for the current user. If it already exists, it will be overwritten.

EXAMPLE 4

Install-Font -Path C:\FontFiles\Arial.ttf -Scope AllUsers -Force

Output:

Arial.ttf reinstalled for all users.

Installs the font file Arial.ttf system-wide and overwrites the existing font if present.

EXAMPLE 5

Get-ChildItem -Path C:\FontFiles\ -Filter *.ttf | Install-Font

Output:

Found 3 font files.
Arial.ttf installed for the current user.
Verdana.ttf installed for the current user.
TimesNewRoman.ttf installed for the current user.

Installs all .ttf font files found in C:\FontFiles for the current user.

EXAMPLE 6

Get-ChildItem -Path C:\FontFiles\ -Filter *.ttf | Install-Font -Scope AllUsers

Output:

Found 3 font files.
Arial.ttf installed for all users.
Verdana.ttf installed for all users.
TimesNewRoman.ttf installed for all users.

Installs all .ttf font files found in C:\FontFiles system-wide. This requires administrator rights.

EXAMPLE 7

Get-ChildItem -Path C:\FontFiles\ -Filter *.ttf | Install-Font -Scope AllUsers -Force

Output:

Found 3 font files.
Arial.ttf reinstalled for all users.
Verdana.ttf reinstalled for all users.
TimesNewRoman.ttf reinstalled for all users.

Installs all .ttf font files found in C:\FontFiles system-wide, overwriting existing fonts. This requires administrator rights.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Force

Force will overwrite existing fonts.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Path

File or folder path(s) to the font(s) to install.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- FullName
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Recurse

Recurse will install all fonts in the specified folder and subfolders.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Scope

Scope of the font installation. CurrentUser will install the font for the current user only. AllUsers will install the font so it is available for all users on the system.

Type: System.String[]
DefaultValue: CurrentUser
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String[]

{{ Fill in the Description }}

OUTPUTS

System.String

{{ Fill in the Description }}

NOTES

Returns messages indicating success or failure of font installation.