0 0

Install Libre Barcode 128 Text Font

Detection:
Add-Type -AssemblyName System.Drawing -ErrorAction SilentlyContinue
$FontInstalled = [System.Drawing.FontFamily]::Families | Where-Object { $_.Name -like "Libre Barcode 128 Text" }
if ($FontInstalled) {
    exit 0
} else {
    exit 1
}
Remediation:
$ProgressPreference = "SilentlyContinue"
$DownloadPath = "C:\Users\Public\Downloads"
$Link = "https://github.com/graphicore/librebarcode/releases/download/v1.008/LibreBarcode_v1.008.zip"
$File = "LibreBarcode_v1.008.zip"
$ExtractedFolder = "LibreBarcode_v1.008"
$FontFile = "LibreBarcode128Text-Regular.ttf"
Invoke-WebRequest -Uri $Link -OutFile "$DownloadPath\$File" -UseBasicParsing
Expand-Archive "$DownloadPath\$File" -DestinationPath $DownloadPath -Force
$FontPath = "$DownloadPath\$ExtractedFolder\$FontFile"
$Shell = New-Object -ComObject Shell.Application
$FontsFolder = $Shell.Namespace(0x14)
$FontsFolder.CopyHere($FontPath, 0x10)