The PowerShell script discussed in this post allows you to deploy fonts within your Windows network.

Many of my clients work in creative industries, so a regular task for us is to install fonts. These fonts might be licensed on a per-machine basis or simply used for only one project and never seen again. This makes it difficult or essentially impractical to build a machine with all the required fonts already installed.

So when a new project starts, or more likely the last minute before several machines head out to give important presentations, you may need to install 50 fonts on 10 machines! But the users have no time for you to log on to their PCs and install the fonts.

Over the years, I have put together what we will generously call some "solutions" to this problem. The most recent was so labor intensive, it was probably more effort than that saved by walking to each individual computer with a pen drive containing the font files.

I speak of course of the Group Policy Preference (GPP) settings. Installing a font with a GPP is quite easy. You can set the font file to copy from a source folder to the C:\Windows\Fonts folder, and in the same GPP, set up the relevant registry key. After a reboot, the font is available for use.

GPP font example

GPP font example

GPP font example registry details

GPP font example registry details

However, as you can see from the two example images, managing multiple font installs using this method (having to create each registry item) is time consuming.

Then when asked to install several more fonts on several more computers, I thought again about using PowerShell. I had investigated font installs with PowerShell before, but I had never found a method that worked for me. I don't remember every example of what I tried, but I do recall one that tried to force the User Account Control (UAC) elevation prompt via PowerShell. The whole thing just seemed a bit lacking, so I put it on the back burner. However, soon I was back again, needing a quick way to install fonts without messing around.

I realized the answer was in front of me. I could use PowerShell to populate the registry section of the GPP for me! Genius.

No—wait. Why use GPP at all if PowerShell can do the registry entries for me? Goal!

So I present to you Font-Install.ps1. The script has two parameters: $pcNames and $fontFolder.

The $pcNames array will accept a list of PC Names, and $fontFolder (as the name suggests) is a string that should contain a Uniform Naming Convention (UNC) path to where the script can find the font files themselves.

The script will test a connection to each PC in turn. It will copy each font file it finds available on the network from the $fontFolder to the C:\Windows\Fonts folder on the PC using the admin $ share. It does this from the machine where the script executes to mitigate the issue of credential hopping through remote PowerShell sessions.

It then processes each font file for the font name (which is not always the same as the file name) and creates a registry entry for that font using Invoke-Command.

Subscribe to 4sysops newsletter!

Font Install.ps1

Font Install.ps1

This is the full script:

  1. DeployGuy (Rank: 1)
    3 years ago

    This is something I have been looking for, I had a similar experience when searching for  solution. What I will do with this is first test this in my environment, but then once I know my environment doesn't break it, I will modify it to be used with SCCM. this will overcome the inherent limitation` of targeting workstations with Invoke-command, because the user has shutdown their workstation. With SCCM the job will just wait for the user to come on line and optionally require a reboot. Great work!


    • Om 1 year ago

      Hey How did you achieve this? could you please share the step by step guide. thanks in advance.


  2. Doug L Fullerton 3 years ago

    Will it do postscript fonts as well?


    • Author

      Only tested True Type and Open Type, both of which appeared as True Type. If you manually install one, go into the fonts folder and open it up what does it show as the title in the menu bar?


  3. Doug L Fullerton 3 years ago

    It just shows the font name.  i.e. Akzidenz Grotesk BE Cn

    File properties shows:

    Type 1 Font file (.PFM)

    Not sure if that helps or not.  ;P


  4. Patrick 3 years ago

    We currently use the following solution

    set MyDir=\\YourShare\YourFonts
    set MyFonts=*.otf    [or *.ttf]
    set LocalFontDir=%SystemRoot%\Fonts

    for /f %%i in ('dir /b %MyDir%\%MyFonts%') do (
    if not exist %LocalFontDir%\%%i cscript.exe %~dp0CopyFont.vbs %MyDir%\%%i

    We are looking for a PowerShell-replacement.


  5. Patrick 3 years ago

    Sorry, obviously the vbs part was missing in my first post:

    Dim MyFont

    If WScript.Arguments.Count > 0 Then MyFont = WScript.Arguments(0) Else WScript.Quit

    'Debugging MsgBox "Now Copying " & MyFont & " to " & FONTS

    Const FONTS = &H14&

    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(FONTS)
    objFolder.CopyHere MyFont

    Set objFolder = nothing
    Set objShell = nothing


  6. Adam 3 years ago

    Broken in W10 1809; Will only install for the Admin user that performs the install, not for all users.

    • Nathan 2 years ago

      Did you logoff or restart after the font install? That seems to be necessary in my Windows 10 testing, before the font will show itself to all users.


    • Alon Or 2 years ago

      I use the following code to install Fonts on remote PCs, no need to logoff or reboot. Tested on 1909.


      • sy 2 years ago


        Thanks for sharing. I like your script better than the one in the article as it will pull multiple font types but I'm getting issues remotely connecting to machines. Your script appears to turn on the WinRM service remotely but doesn't seem to work for me in my environment. I'm getting "No Connection to WinRM service on Remote Pc". Any suggestions?


        • Could you share exact error message? Also, did you enable PS remoting on the remote machines with command Enable-PSRemoting?


          • sy 2 years ago

            Leos, thanks for your response. Once enabling that on the remote machine, it worked! I'm assuming PSRemoting should be disabled as it could be a security risk?


            • I dont consider it as a security risk if everything is configured well. PS-Remoting use Kerberos, you can enable it only in Domain profile or specify exact IPs from where you can run the tasks. Both on Windows FW or network FW level.


        • Alon Or 2 years ago



          • Why are you using such script to start WinRM service? It is very unusual. Remember that the *-Service commands use WMI to run, which might be blocked on firewalls. Standard procedure is to have Powershell remoting enabled on all computers via GPO and then just use Invoke-command or other commands that run via WinRM.


            • Alon Or 2 years ago

              Let`s say you just got there and have no time to start making other adjustments, GPO`s and other things.

              As for the FW thing, I prefer to have a VM for administration purposes so all the ports needed are open.

              My script simply works , dirty, but works, for sure I could make it better , but for now it just fill`s the need.

              Feel free to make it better and share it . Thank You.


              • If you had time to configure FW for your specific management VM, then you also got time to enable Ps-Remoting which is one time action 🙂

                You can work as you wish, of course.


                • Alon Or 2 years ago

                  The guy before me had the VM  and FW configured wink


      • mikeg 6 months ago

        If I'm not mistaken, in 1909 it is already possible to install fonts on behalf of a regular user. (right-click), i.e. if such a concept is allowed in the organization, this reduces the load of requests for the IT department.


  7. Ian Manning 3 years ago

    Incredible help as part of a larger install script I wrote today, thanks so much!


    • Roy Hill 2 years ago

      Ian Manning, would you be willing to share your script with us?


  8. Mickael 2 years ago

    Thx a lot for your help with this script. I just have one question.
    Why he stop processing at the "conneting to" and don't go to "Installing Font"


  9. Prabhas 2 years ago

    Hi Rob, any solution for Windows 10 1809 ? Not sure if you have any working script for install fonts on Windows 10 1809.

    Thanks in advance.


  10. Christian Barnes 2 years ago

    Has anyone managed to make this work through Powershell since 1809 was released? The copyhere method  I used to use is not working through Intune.


    • Christian 2 years ago

      Just to mention, in the end I wrote a basic script that used 'copy-item' for each font straight into the system fonts folder and added a registry key into the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts. I put this in a for loop to install any .ttf fonts found in a certain folder and it worked when deployed through Intune in a cloud only environment.


  11. chungb 2 years ago

    Hi, when running the script I keep receive the error " Computer unavailable" but I able to ping the computer


  12. mikeg 6 months ago

    I also want to share a primitive task of installing fonts using Ansible:

    - name: Install Fonts
    hosts: all
    - name: FontsTestPS
    win_shell: |
    $fonts = (New-Object -ComObject Shell.Application).Namespace(0x14)
    dir \\someserver\FONTS\*.ttf | %{ $fonts.CopyHere($_.fullname) }
    dir \\someserver\FONTS\*.otf | %{ $fonts.CopyHere($_.fullname) }

    - name: Warn logged in users of Installed Fonts
    display_seconds: 20
    msg: The fonts are installed, click OK. if necessary, restart the application.


  13. Michael Cannard 5 months ago

    Here is a simpler powershell solution that accounts for User installed fonts. Tested in Windows 10 20H2.

    Mostly stolen from other posts though - Just updated a bit.



  14. This should be more efficient


Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *


© 4sysops 2006 - 2021


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account