Forum Discussion
Forcing Outlook Fonts via Intune
Im familiar with PowerShell but I have no experience at all with this.
I'd contact the creator itself, he is familiar with this, maybe there is an easy fix.
My AI says powershell can handle those hex numbers.
I'll leave the suggested code from my AI but I highly recommend to test it only in DEV Environments aswell as contact your linkedin contact.
function Convert-HexCsvToByteArray {
param([string]$Csv)
$Csv -split ',' |
Where-Object { $_ -ne '' } |
ForEach-Object { [Convert]::ToByte(($_ -replace '\s',''), 16) }
}$bytesSimple = Convert-HexCsvToByteArray $ValueSimple
$bytesComposeComplex = Convert-HexCsvToByteArray $ValueComposeComplex
$bytesReplyComplex = Convert-HexCsvToByteArray $ValueReplyComplex
$bytesTextComplex = Convert-HexCsvToByteArray $ValueTextComplex$registryPath = 'HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\mailsettings'
$Name1Simple = "ComposeFontSimple"
$Name1Complex = "ComposeFontComplex"
$Name2Simple = "ReplyFontSimple"
$Name2Complex = "ReplyFontComplex"
$Name3Simple = "TextFontSimple"
$Name3Complex = "TextFontComplex"if (-not (Test-Path $registryPath)) {
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name NewTheme -Value '' -PropertyType String -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name1Simple -Value $bytesSimple -PropertyType Binary -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name2Simple -Value $bytesSimple -PropertyType Binary -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name3Simple -Value $bytesSimple -PropertyType Binary -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name1Complex -Value $bytesComposeComplex -PropertyType Binary -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name2Complex -Value $bytesReplyComplex -PropertyType Binary -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name3Complex -Value $bytesTextComplex -PropertyType Binary -Force | Out-Null
}
else {
Set-ItemProperty -Path $registryPath -Name NewTheme -Value $null
New-ItemProperty -Path $registryPath -Name ThemeFont -Value 2 -PropertyType DWord -Force | Out-Null
Set-ItemProperty -Path $registryPath -Name $Name1Simple -Value $bytesSimple
Set-ItemProperty -Path $registryPath -Name $Name2Simple -Value $bytesSimple
Set-ItemProperty -Path $registryPath -Name $Name3Simple -Value $bytesSimple
Set-ItemProperty -Path $registryPath -Name $Name1Complex -Value $bytesComposeComplex
Set-ItemProperty -Path $registryPath -Name $Name2Complex -Value $bytesReplyComplex
Set-ItemProperty -Path $registryPath -Name $Name3Complex -Value $bytesTextComplex
}