Skip to content

🪲[Bug]: -Force option not working #109

Open
PSModule/Fonts
#70

Description

Describe the bug

When installing fonts, with -Force option, I still see exceptions for already existing fonts. I use force to upgrade existing ones, but I can't do it.

Here's the command with the output:

PS C:\Users\alex> Install-NerdFont -All -Force -Scope AllUsers

Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFont-Bold.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFont-Italic.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFont-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFontMono-Bold.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFontMono-Italic.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFontMono-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFontPropo-Bold.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFontPropo-Italic.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\0xProtoNerdFontPropo-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFont-Condensed.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFont-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFont-SemiCondensed.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFontMono-Condensed.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFontMono-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFontMono-SemiCondensed.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFontPropo-Condensed.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFontPropo-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\3270NerdFontPropo-SemiCondensed.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\AgaveNerdFont-Bold.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\AgaveNerdFont-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\AgaveNerdFontMono-Bold.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\AgaveNerdFontMono-Regular.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\AgaveNerdFontPropo-Bold.ttf' already exists."
Install-Font: Failed [10/10] - Stopping
Install-Font: Exception calling "CopyTo" with "1" argument(s): "The file 'C:\WINDOWS\Fonts\AgaveNerdFontPropo-Regular.ttf' already exists."

Version information

Name                           Value
----                           -----
PSVersion                      7.6.5
PSEdition                      Core
GitCommitId                    7.6.5
OS                             Microsoft Windows 10.0.26120
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     1.1.1                 NerdFonts                           Core,Desk {Get-NerdFont, Install-NerdFont, Get-NerdFonts, Install-NerdFonts}

To reproduce

Install-NerdFont -All -Force -Scope AllUsers

Activity

  1. changed the title [-]🪲[Bug]:[/-] [+]🪲[Bug]: -Force option not working[/+] on Aug 27, 2026
  2. MariusStorhaug commented on Aug 27, 2026

    @MariusStorhaug
    Member

    Alessandro Del Prete (@alexdelprete) Hi Alex, thank you for posting this. Will have a fix for it shortly!

  3. alexdelprete commented on Aug 28, 2026

    @alexdelprete
    Author

    Thanks to you Marius for the work you put into this.

    Would be awesome to have an -Upgrade switch that automagically upgrades only the installed fonts that are outdated. :)

  4. jacktose commented on Oct 14, 2026

    @jacktose

    Is PSModule/Fonts#70 ready to go?

    I just found this cool tool and then was bummed that my main use for it is broken.

  5. alexdelprete commented on Oct 22, 2026

    @alexdelprete
    Author

    Hi Marius Storhaug (@MariusStorhaug), I noticed the fix is already there, but it hasn't been merged yet. Woule be awesome if we finally have this fixed. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions