Skip to content

Get-Font

SYNOPSIS

Retrieves the installed fonts.

SYNTAX

Get-Font [[-Name] <String[]>] [[-Scope] <String[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Retrieves a list of installed fonts for the current user or all users, depending on the specified scope. Supports filtering by font name using wildcards.

EXAMPLES

EXAMPLE 1

Get-Font

Output:

Name     Path                             Scope
----     ----                             -----
Arial    C:\Windows\Fonts\arial.ttf      CurrentUser

Gets all the fonts installed for the current user.

EXAMPLE 2

Get-Font -Name 'Arial*'

Output:

Name       Path                                Scope
----       ----                                -----
Arial      C:\Windows\Fonts\arial.ttf         CurrentUser
Arial Bold C:\Windows\Fonts\arialbd.ttf       CurrentUser

Gets all the fonts installed for the current user that start with 'Arial'.

EXAMPLE 3

Get-Font -Scope 'AllUsers'

Output:

Name      Path                               Scope
----      ----                               -----
Calibri   C:\Windows\Fonts\calibri.ttf      AllUsers

Gets all the fonts installed for all users.

EXAMPLE 4

Get-Font -Name 'Calibri' -Scope 'AllUsers'

Output:

Name     Path                               Scope
----     ----                               -----
Calibri  C:\Windows\Fonts\calibri.ttf      AllUsers

Gets the font with the name 'Calibri' for all users.

PARAMETERS

-Name

Specifies the name of the font to get.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: *
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: True

-Scope

Specifies the scope of the font(s) to get.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: CurrentUser
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

OUTPUTS

System.Collections.Generic.List[PSCustomObject]

NOTES

Returns a list of installed fonts. Each font object contains properties: - Name: The font name. - Path: The full file path to the font. - Scope: The scope from which the font is retrieved.

https://psmodule.io/Font/Functions/Get-Font