Uninstall-Font¶
SYNOPSIS¶
Uninstalls a font from the system.
SYNTAX¶
Uninstall-Font [-Name] <String[]> [[-Scope] <String[]>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
DESCRIPTION¶
Uninstalls a font from the system. The function supports removing fonts for either the current user or all users. If attempting to remove a font for all users, administrative privileges are required. The function ensures font files are deleted, and if on Windows, it also unregisters fonts from the registry.
EXAMPLES¶
EXAMPLE 1¶
Uninstall-Font -Name 'Courier New'
Output:
VERBOSE: [Uninstall-Font] - [CurrentUser] - [Courier New] - Processing
VERBOSE: [Uninstall-Font] - [CurrentUser] - [Courier New] - Removing file [C:\Windows\Fonts\cour.ttf]
VERBOSE: [Uninstall-Font] - [CurrentUser] - [Courier New] - Unregistering font [Courier New]
VERBOSE: [Uninstall-Font] - [CurrentUser] - [Courier New] - Done
Uninstalls the 'Courier New' font from the system for the current user.
EXAMPLE 2¶
Uninstall-Font -Name 'Courier New' -Scope AllUsers
Output:
VERBOSE: [Uninstall-Font] - [AllUsers] - [Courier New] - Processing
VERBOSE: [Uninstall-Font] - [AllUsers] - [Courier New] - Removing file [C:\Windows\Fonts\cour.ttf]
VERBOSE: [Uninstall-Font] - [AllUsers] - [Courier New] - Unregistering font [Courier New]
VERBOSE: [Uninstall-Font] - [AllUsers] - [Courier New] - Done
Uninstalls the 'Courier New' font from the system for all users. Requires administrative privileges.
PARAMETERS¶
-Name¶
Name of the font to uninstall.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: True
-Scope¶
Scope of the font to uninstall. CurrentUser will uninstall the font for the current user. AllUsers will uninstall the font so it is removed for all users.
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¶
None¶
NOTES¶
The function does not return any objects.