Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Last active March 16, 2022 23:40
Show Gist options
  • Save cmatskas/341726cba7c1678d8ae83d15e582ecb7 to your computer and use it in GitHub Desktop.
Save cmatskas/341726cba7c1678d8ae83d15e582ecb7 to your computer and use it in GitHub Desktop.
PS Script to Install fonts
echo "Install Custom fonts"
$fonts = (New-Object -ComObject Shell.Application).Namespace(0x14)
foreach ($file in gci *.ttf)
{
$fileName = $file.Name
if (-not(Test-Path -Path "C:\Windows\fonts\$fileName" )) {
echo $fileName
dir $file | %{ $fonts.CopyHere($_.fullname) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment