-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfind_fonts.ps1
22 lines (14 loc) · 970 Bytes
/
find_fonts.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#Find fonts in an array on a machine to tell if they are installed. We used this in our RMM before pushing a font installer
$GciFiles = Get-Childitem C:\Windows\Fonts -Force
#$GciFiles | Sort-Object | FT Name
foreach ($font in $GciFiles) {
If ($font.Name -EQ "BASKVILL.ttf") {Write-Host “Baskerville is present”}
If ($font.Name -EQ "*GillSansNova-Light.otf*") {Write-Host “Gill Sans Nova Light is present”}
If ($font.Name -EQ "*GillSansNova-LightItalic.otf*") {Write-Host “Gill Sans Nova Light Italic is present”}
If ($font.Name -EQ "*GillSansNova-Medium.otf*") {Write-Host “Gill Sans Nova Medium is present”}
If ($font.Name -EQ "*GillSansNova-MediumItalic.otf*") {Write-Host “Gill Sans Nova Medium Italic is present”}
If ($font.Name -EQ "*GillSansNova-UltraLight.otf*") {Write-Host “Gill Sans Nova Ultra Light is present”}
#else {Write-Host “Nope”}
else {Continue}
}
Write-Host "Script has finished running"