I have a folder filled with TTF files of custom fonts. I need to install them as system fonts using a powershell script (this is on Windows Server 2008 R2). Does anybody know
Using the Shell.Application
COM object doesn't work on Server Core (at least not on 2012 R2).
I had success by simply copying the font file to C:\Windows\Fonts
(in this case times.ttf) and then adding the corresponding registry entry with PowerShell:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts' -Name 'Times New Roman (TrueType)' -PropertyType String -Value times.ttf
Removal is the reverse of installation. The only downside is that a restart is required both after the font has been installed and also before it is uninstalled if an application has referenced it.