Install fonts with PowerShell

The function Install-Font lets you install fonts using PowerShell. It triggers the Install for all users command, utilizing a technique demonstrated by Stefan Kanthak:

function Install-Font {
		[Parameter(Mandatory, ValueFromPipeline)]
	begin {
		$shell = New-Object -ComObject 'Shell.Application';
	process {
		Write-Host -Message(
			'Installing font "{0}".' -f $_.Name
		).Verbs() | ForEach-Object {
			if( $_.Name -eq 'Install for &all users' ) {

Use this function as follows:

PS C:\> Get-ChildItem -LiteralPath "$env:USERPROFILE\Downloads" -File -Filter *.ttf | Install-Font