Repository navigation
🪲[Bug]: -Force option not working #109
Copy link
Copy link
Open
PSModule/Fonts
#70Description
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.0ModuleType 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 AllUsersReacted by Jack Haden-Enneking
Reacted by Marius Storhaug
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]🪲[Bug]:[/-][+]🪲[Bug]: -Force option not working[/+]MariusStorhaug commentedon Aug 27, 2026
Alessandro Del Prete (@alexdelprete) Hi Alex, thank you for posting this. Will have a fix for it shortly!
alexdelprete commentedon Aug 28, 2026
Thanks to you Marius for the work you put into this.
Would be awesome to have an
-Upgradeswitch that automagically upgrades only the installed fonts that are outdated. :)jacktose commentedon Oct 14, 2026
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.
alexdelprete commentedon Oct 22, 2026
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.