$FONTS = 0x14
#Local Folder
$Path="C:\temp\fonts"
$WindowsFontsdir="C:\Windows\Fonts"
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.Namespace($FONTS)
#Copy All Fonts from NetworkSource to $Path
New-Item $Path -type directory
Copy-Item "\\someserver\someshare\*.ttf" $Path
$Fontdir = dir $Path
#Make sure only new fonts are copied
$Source = Get-ChildItem -Filter *.ttf -path $Path
$Target = Get-ChildItem -Filter *.ttf -path $WindowsFontsdir
$Diff = Compare-Object -ReferenceObject $Target -DifferenceObject $Source | Where-Object {$_.SideIndicator -eq '=>'} | select @{n="InputObject";e={
if ($_.inputobject -is [system.io.directoryinfo])
{([system.io.DirectoryInfo]$_.InputObject).fullname}
else
{ ([system.io.FileInfo]$_.InputObject).fullname}}},SideIndicator
$Diff = $Diff.InputObject
#Copy and automatically register the fonts
$Diff | ForEach-Object {
$_
$objFolder.CopyHere($_)
}
remove-item $Path -recurs