Set OWA Font Default Settings for distribution groups
Introduction
This script will set OWA Default Font Settings for distribution groups.
Scenarios
This script is to help Exchange Admins to quickly set OWA Default Font Settings via PowerShell.
Script
This script contains one advanced function Set-OSCOWAFontDefaultSettingsForGroups, you can use this script in the following ways:
Step1: Run the script in the Exchange Management Shell, type the one command: Import-Module <Script Path> at the prompt.
For example, type Import-Module C:\Script\SetOWAFontDefaultMessageSettingsForGroups.psm1
Here are some code snippets for your references.
if($Members){
Foreach($member in $Members){
if($FontName){
#Set Font Name
Set-MailboxMessageConfiguration $member -DefaultFontName $FontName
}
if($Size){
#Set Font Size
Set-MailboxMessageConfiguration $member -DefaultFontSize $Size
$checksize = (Get-MailboxMessageConfiguration $member).DefaultFontSize
if($checksize -ne $Size){
break Label1
}
}
if($Color){
#Set Font Color
Set-MailboxMessageConfiguration $member -DefaultFontColor $Color
$checkcolor = (Get-MailboxMessageConfiguration $member).DefaultFontColor
if($checkcolor -ne $Color){
break Label1
}
}
if($Flag){
#Set Font Flag
Set-MailboxMessageConfiguration $member -DefaultFontFlags $Flag
$checkflag = (Get-MailboxMessageConfiguration $member).DefaultFontFlags
if($checkflag -ne $Flag){
break Label1
}
}
}
Write-Host "Distribution Group $gp had been modified."
}
if($Members){
Foreach($member in $Members){
if($FontName){
#Set Font Name
Set-MailboxMessageConfiguration $member -DefaultFontName $FontName
}
if($Size){
#Set Font Size
Set-MailboxMessageConfiguration $member -DefaultFontSize $Size
$checksize = (Get-MailboxMessageConfiguration $member).DefaultFontSize
if($checksize -ne $Size){
break Label1
}
}
if($Color){
#Set Font Color
Set-MailboxMessageConfiguration $member -DefaultFontColor $Color
$checkcolor = (Get-MailboxMessageConfiguration $member).DefaultFontColor
if($checkcolor -ne $Color){
break Label1
}
}
if($Flag){
#Set Font Flag
Set-MailboxMessageConfiguration $member -DefaultFontFlags $Flag
$checkflag = (Get-MailboxMessageConfiguration $member).DefaultFontFlags
if($checkflag -ne $Flag){
break Label1
}
}
}
Write-Host "Distribution Group $gp had been modified."
}
Examples
Example 1: Set OWA Font
Defalut Settings for Distribution Group "Test1", with Font Name "Arial", Font Size "3", Font Color "Blue" and Font Flag "Bold".
Command: Set-OSCOWAFontDefaultSettingsForGroups -Group "Test1" -FontName "Arial" -Size "3" -Color "#0000FF" -Flag "Bold"
Screenshot:
Example 2: Set OWA Font
Defalut Settings for Distribution Group "Test1","Test2", with Font Size "3".
Command: Set-OSCOWAFontDefaultSettingsForGroups -Group "Test1","Test2" -Size "3"
Screenshot:
Prerequisite
Exchange 2010 and above Exchange Version
English Version only
PowerShell 2.0
Microsoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.