banner



How To Install Fonts On Windows Server 2012 R2

In this article, we'll show how to install additional fonts on computers in an Agile Directory domain using Grouping Policy and PowerShell script. This guide was tested on electric current Windows 10 20H2 and Windows Server 2022/2019 builds.

Deploying New Fonts via GPO

If you desire to install one or two new fonts, you can do it using the Group Policy. To install a font, copy a *.ttf file to %WindowsDir%\Fonts\ on a client computer and add the new font data to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts registry fundamental.

  1. Re-create the TTF font file to a shared network folder on your file server (if you have only some new fonts, you can shop them in SYSVOL folder on your domain controller); copy font files to share folder
  2. Open the domain Group Policy Direction console (gpmc.msc), create a new policy GPO_InstallFonts and link it to the OU with computers; create gpo to install fonts
  3. Edit the policy;
  4. Create a new rule in Grouping Policy Preferences to copy a font file from the shared folder to %WindowsDir%\Fonts\ on your client devices. Earlier we showed how to copy a file to computers using GPO. Create a group policy following these instructions. Go to Computer Configuration -> Preferences -> Windows Settings -> Files. Create a policy entry with the parameters below:Source: \\woshub.com\SYSVOL\woshub.com\scripts\Fonts\Roboto-Blackness.ttf
    Destination: %WindowsDir%\Fonts\Roboto-Blackness.ttf

    copy font file to computer using group policy

  5. Now you need to add together the information about your new font to the registry. To make changes to the registry using GPO you tin also use GPP (Computer Configuration -> Preferences -> Windows Settings -> Registry);
  6. Y'all can specify the font data in the registry manually. Nonetheless, it is easier to install a font manually on a reference estimator and consign the font registry settings using a sorcerer (Figurer Configuration -> Preferences -> Windows Settings -> Registry -> New -> Registry Sorcerer); gpo remote registry browser
  7. Employ the Registry Browser to go to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts reg key on a remote calculator. Discover and select the registry item containing the name of the font you desire to install; select font parameter in the registry
  8. The registry parameter volition appear in the GPO editor.

deploy font registry settings using group policy

And then update GPO settings on the client computer and make certain that the new font file has been installed. In Windows 10, you can view the list of installed fonts in the Settings -> Personalization -> Fonts.

new font appeared in Windows 10

Install Windows Fonts Using PowerShell Logon Script

It is worth to employ the font installation method using GPO described in a higher place if you lot want to install some fonts simply. If you lot desire to install a lot of new font files at once, it is better to use a PowerShell script, since it may be tiresome to create special policy options for each font.

The following PowerShell script will install all *.ttf and *.otf font files located in the specified shared binder. Too, the script writes all actions to the log file using the WriteLog function.

role WriteLog
{
Param ([string]$LogString)
$Postage stamp = (Get-Date).toString("yyyy/MM/dd HH:mm:ss")
$LogMessage = "$Postage stamp $LogString"
Add-content $LogFile -value $LogMessage
}
$Logfile = "C:\Windows\posh_font_install.log"
$SourceFolder = "\\woshub.com\SYSVOL\woshub.com\scripts\Fonts"
Add together-Blazon -AssemblyName Arrangement.Drawing
$WindowsFonts = [Arrangement.Drawing.Text.PrivateFontCollection]::new()
Get-ChildItem -Path $SourceFolder -Include *.ttf, *.otf -Recurse -File |
Re-create-Detail -Destination "$env:SystemRoot\Fonts" -Force -Confirm:$imitation -PassThru |
ForEach-Object {
WriteLog "Installing font file $_.name"
$WindowsFonts.AddFontFile($_.fullname)
$RegistryValue = @{
Path = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts'
Proper name = $WindowsFonts.Families[-ane].Proper noun
Value = $_.Fullname
}
$RemoveRegistry = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"
Remove-ItemProperty -name $($WindowsFonts.Families[-1].Name) -path $RemoveRegistry
New-ItemProperty @RegistryValue
}

Install new fonts in Windows with a PowerShell script

Save the PowerShell script as a PS1 file and run it as a logon script using GPO.

Thus, all font files from the specified binder will be installed in Windows, and the installation date and time volition be logged.

font installation log

If you demand to remove all boosted fonts in Windows and restore the default ones, follow this guide.

Source: http://woshub.com/install-fonts-windows-gpo-powershell/

Posted by: reynoldsamons1986.blogspot.com

0 Response to "How To Install Fonts On Windows Server 2012 R2"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel