Mit diesem Script kopiere ich von einer Netzwerkfreigabe, die Font Dateien in ein lokales Temp Verzeichniss.

Anschließend werden diese installiert, und danach aus dem Temp Verzeichniss gelöscht. Ich verwende das Script mit Deskcenter, es ist allerdings auch möglich das ganze in eine GPO zu verpacken, und dann bei jedem Start auszuführen.

 

Powershell Script um Fonts zu installieren.

 

 

#Font Locations
    #Network Location
    $NetworkPath = "\\srv01\freigabe01\Verteiler\Fonts" 
    #Local Location (temp place to store fonts)
    $LocalPath= "C:\Temp\Fonts\"

$FONTS = 0x14
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.Namespace($FONTS)

New-Item $LocalPath -type directory -Force
Copy-Item "$NetworkPath\*" $LocalPath

$Fontdir = dir $LocalPath
foreach($File in $Fontdir) 
{
  if ((Test-Path "C:\Windows\Fonts\$File") -eq $False)
    {
    $objFolder.CopyHere($File.fullname,0x10)
    }
}
remove-item $LocalPath -recurse