More PowerShell and more things to configure! So now that I have Mobile Device Mailbox Policies out of the way and a few other OWA vDir configuration options, I am now on to configuring OWA Mailbox Policies using PowerShell. Similar to the Mobile Device Mailbox Policy and the OWA Virtual Directory scripts I have, this one is also menu drive. Notice at the top, that selecting a policy to work with is mandatory:

If you fail to do so, things will not work quite as expected.
Script Purpose
Provides access to all the settings that can be configured on a OWA Mailbox Policy. Hopefully it will provide more visibility to all the settings that can be configured for OWA policies. The script will not allow the creation of a new policy, nor will it assign one to users. If there is interest, I may add that later. For now this is simply for changing settings on the policies.
The menu is large and provides access to 60+ options. Some options are multivalued and I do not have logic yet to handle those properly and I hope to have this worked out this week. At the bottom of the article is a list of options that are not available, Microsoft Internal, deprecated or not functioning. Please refer to this list before running the script.
Script Run Through
In this section I will go through a couple of runs through the script to show you what it can accomplish.
Modifying the ‘AllowOfflineMode’ Value
This value has a three different choices of Private Computers, All Computers or No Computers. The default value is All Computers, but I had changed the value to Private Computers for testing. In the below example the value is again changed to ‘No Computers’ and the value is verified before the menu loads again.

Modifying the ‘OutboundCharset’ Value
According to Microsoft:
“OutboundCharset The OutboundCharset parameter specifies the character set that’s used on messages that are sent by users on a specific Outlook Web App virtual directory. It accepts three settings: autodetect, alwaysUTF8, and UserLanguageChoice. Autodetect causes Exchange to examine the first 2 kilobytes (KB) of text and deduce the character set to use. This is the preferred method. AlwaysUTF8 causes Exchange to always use UTF-8 encoded UNICODE characters on outgoing messages. UserLanguageChoice causes Exchange to use the language that’s used in the Outlook Web App user interface to encode messages. This can be a problem if the preferred language and the language that’s used on an individual message aren’t the same.
OutboundCharset

From what I can tell, I would only change this setting for testing rather than production unless you have a specific use case. The menu option is there simply because it is an available option.
Modifying the ‘ReportJunkEmailEnabled’ Value
The ReportJunkEmailEnabled parameter specifies whether users can report messages as junk to Microsoft in Outlook Web App. Valid input for this parameter is $true or $false. The default value is $true.
If you set this parameter to $false, the Report mail as junk window doesn’t appear after users select Mark as junk. This parameter is meaningful only when the JunkEmailEnabled parameter is set to $true.
SOURCE
In most circumstances you would want your users to report on messages that are spam:

However, you could turn it off, if you would like:

Some Switches Available (or not)
While researching this article I ran into a switch that is not deprecated, internal Microsoft restricted or cloud-only. The FacebookEnabled cmdlets does not see to work. It shows up like this in PowerShell:

… and lower in the help for the cmdlet …

Notice that the switch is not valid when trying to configure the OWA Mailbox Policy:
![]()
Just be aware that this parameter may not work for you. I’ve validated the same results in CU3 and CU7 so far.
The Script!
<#
.SYNOPSIS
This script all you to modify existing OWA Mailbox Policies
.DESCRIPTION
.NOTES
Version : 1.0
Wish list : Add multi value variables to the script
Allow the creation of new OWA Mailbox Policies
Rights Required : Local admin on server
Sched Task Req'd : No
Exchange Version : 2013
Author : Just A UC Guy [JAUCG]
Email/Blog/Twitter : ( ) http://justaucguy.wordpress.com/
Dedicated Blog : http://justaucguy.wordpress.com/
Disclaimer : You are on your own. This was not written by, support by, or endorsed by Microsoft.
Info Stolen from : None, all hand written code.
.LINK
[TBD]
.EXAMPLE
.\Change-OWAvDirSettings
.INPUTS
None. You cannot pipe objects to this script.
#>
param(
[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)]
[string] $strFilenameTranscript = $MyInvocation.MyCommand.Name + " " + (hostname)+ " {0:yyyy-MM-dd hh-mmtt}.log" -f (Get-Date),
[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$true, Mandatory=$false)]
[string] $TargetFolder = "c:\Install",
# [string] $TargetFolder = $Env:Temp
[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)]
[bool] $WasInstalled = $false,
[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)]
[bool] $RebootRequired = $false,
[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)]
[string] $opt = "None",
[parameter(ValueFromPipeline=$false, ValueFromPipelineByPropertyName=$false, Mandatory=$false)]
[bool] $HasInternetAccess = ([Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet)
)
Start-Transcript -path .\$strFilenameTranscript | Out-Null
$error.clear()
Clear-Host
Pushd
write-host " "
write-host "Choose Option 'C' to choose the policy to modify - REQUIRED." -ForegroundColor Green
write-host " "
write-host " "
start-sleep 2
[string] $menu = @'
***********************************************************
Mobile Device Mailbox Policy
***********************************************************
(C) Choose which policy to modify - REQUIRED!
(1) ActionForUnknownFileAndMIMETypes (31) IsDefault (61) UseGB18030
(2) ActiveSyncIntegrationEnabled (32) IsValid (62) UseISO885915
(3) AllAddressListsEnabled (33) JournalEnabled (63) WacExternalServicesEnabled
(4) AllowCopyContactsToDeviceAddressBook (34) JunkEmailEnabled (64) WacOMEXEnabled
(5) AllowedFileTypes (35) LogonAndErrorLanguage (65) WacViewingOnPrivateComputersEnabled
(6) AllowedMimeTypes (36) Name (66) WacViewingOnPublicComputersEnabled
(7) AllowOfflineOn (37) NotesEnabled (67) WebPartsFrameOptionsType
(8) BlockedFileTypes (38) OrganizationEnabled (68) WebReadyDocumentViewingForAllSupportedTypes
(9) BlockedMimeTypes (39) OrganizationId (69) WebReadyDocumentViewingOnPrivateComputersEnabled
(10) CalendarEnabled (40) OutboundCharset (70) WebReadyDocumentViewingOnPublicComputersEnabled
(11) ChangePasswordEnabled (41) OWALightEnabled (71) WebReadyDocumentViewingSupportedFileTypes
(12) ContactsEnabled (42) PhoneticSupportEnabled (72) WebReadyDocumentViewingSupportedMimeTypes
(13) DefaultTheme (43) PredictedActionsEnabled (73) WebReadyFileTypes
(14) DelegateAccessEnabled (44) PublicFoldersEnabled (74) WebReadyMimeTypes
(15) DirectFileAccessOnPrivateComputersEnabled (45) RecoverDeletedItemsEnabled
(16) DirectFileAccessOnPublicComputersEnabled (46) RemindersAndNotificationsEnabled
(17) DisplayPhotosEnabled (47) ReportJunkEmailEnabled
(18) ExplicitLogonEnabled (48) RulesEnabled
(19) FacebookEnabled (49) SearchFoldersEnabled
(20) ForceSaveAttachmentFilteringEnabled (50) SetPhotoEnabled & SetPhotoURL
(21) ForceSaveFileTypes (51) SignaturesEnabled
(22) ForceSaveMimeTypes (52) SilverlightEnabled
(23) ForceWacViewingFirstOnPrivateComputers (53) SkipCreateUnifiedGroupCustomSharepointClassification
(24) ForceWacViewingFirstOnPublicComputers (54) SMimeEnabled
(25) ForceWebReadyDocumentViewingFirstOnPrivateComputers (55) TasksEnabled
(26) ForceWebReadyDocumentViewingFirstOnPublicComputers (56) TextMessagingEnabled
(27) GlobalAddressListEnabled (57) ThemeSelectionEnabled
(28) InstantMessagingEnabled (58) UMIntegrationEnabled
(29) InstantMessagingType (59) UNCAccessOnPrivateComputersEnabled
(30) IRMEnabled (60) UNCAccessOnPublicComputersEnabled
(99) Exit
Select an option.. [1-99]?
'@
function ActionForUnknownFileAndMIMETypes {
write-host " "
write-host "Action For Unknown File And MIME Types - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ActionForUnknownFileAndMIMETypes
write-host " "
write-host "Change Action For Unknown File And MIME Types Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Action For Unknown File And MIME Types to (a) Allow, (f) ForceSave and (b) Block>"
if ($answer -eq "a") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ActionForUnknownFileAndMIMETypes Allow }
if ($answer -eq "b") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ActionForUnknownFileAndMIMETypes ForceSave }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ActionForUnknownFileAndMIMETypes Block }
write-host " "
write-host "Action For Unknown File And MIME Types - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ActionForUnknownFileAndMIMETypes = $value.ActionForUnknownFileAndMIMETypes
$ActionForUnknownFileAndMIMETypes
}
} # End of ActionForUnknownFileAndMIMETypes
function ActiveSyncIntegrationEnabled {
write-host " "
write-host "Active Sync Integration Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ActiveSyncIntegrationEnabled
write-host " "
write-host "Change Active Sync Integration Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Active Sync Integration Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ActiveSyncIntegrationEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ActiveSyncIntegrationEnabled $false }
write-host " "
write-host "Active Sync Integration Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ActiveSyncIntegrationEnabled = $value.ActiveSyncIntegrationEnabled
$ActiveSyncIntegrationEnabled
}
} # End of ActiveSyncIntegrationEnabled
function AllAddressListsEnabled {
write-host " "
write-host "All Address Lists Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).AllAddressListsEnabled
write-host " "
write-host "Change All Address Lists Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set All Address Lists Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -AllAddressListsEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -AllAddressListsEnabled $false }
write-host " "
write-host "All Address Lists Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$AllAddressListsEnabled = $value.AllAddressListsEnabled
$AllAddressListsEnabled
}
} # End of AllAddressListsEnabled
function AllowCopyContactsToDeviceAddressBook {
write-host " "
write-host "Allow Copy Contact sTo Device Address Book - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).AllowCopyContactsToDeviceAddressBook
write-host " "
write-host "Change Allow Copy Contact sTo Device Address Book Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Allow Copy Contact sTo Device Address Book to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -AllowCopyContactsToDeviceAddressBook $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -AllowCopyContactsToDeviceAddressBook $false }
write-host " "
write-host "Allow Copy Contact sTo Device Address Book - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$AllowCopyContactsToDeviceAddressBook = $value.AllowCopyContactsToDeviceAddressBook
$AllowCopyContactsToDeviceAddressBook
}
} # End of AllowCopyContactsToDeviceAddressBook
function AllowOfflineOn {
write-host " "
write-host "Allow Offline On - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).AllowOfflineOn
write-host " "
write-host "Change Allow Offline On Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Allow Offline On to (p) PrivateComputersOnly, (n)NoComputers or (a) AllComputers"
if ($answer -eq "p") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -AllowOfflineOn PrivateComputersOnly }
if ($answer -eq "n") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -AllowOfflineOn NoComputers }
if ($answer -eq "a") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -AllowOfflineOn AllComputers }
write-host " "
write-host "Allow Offline On - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$AllowOfflineOn = $value.AllowOfflineOn
$AllowOfflineOn
}
} # End of AllowOfflineOn
function CalendarEnabled {
write-host " "
write-host "Calendar Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).CalendarEnabled
write-host " "
write-host "Change Calendar Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Calendar Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -CalendarEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -CalendarEnabled $false }
write-host " "
write-host "Calendar Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$CalendarEnabled = $value.CalendarEnabled
$CalendarEnabled
}
} # End of CalendarEnabled
function ChangePasswordEnabled {
write-host " "
write-host "Change Password Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ChangePasswordEnabled
write-host " "
write-host "Change Change Password Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Change Password Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ChangePasswordEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ChangePasswordEnabled $false }
write-host " "
write-host "Change Password Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ChangePasswordEnabled = $value.ChangePasswordEnabled
$ChangePasswordEnabled
}
} # End of ChangePasswordEnabled
function ContactsEnabled {
write-host " "
write-host "Contacts Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ContactsEnabled
write-host " "
write-host "Change Contacts Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Contacts Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ContactsEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ContactsEnabled $false }
write-host " "
write-host "Contacts Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ContactsEnabled = $value.ContactsEnabled
$ContactsEnabled
}
} # End of ContactsEnabled
function DelegateAccessEnabled {
write-host " "
write-host "Delegate Access Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).DelegateAccessEnabled
write-host " "
write-host "Change Delegate Access Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Delegate Access Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DelegateAccessEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DelegateAccessEnabled $false }
write-host " "
write-host "Delegate Access Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$DelegateAccessEnabled = $value.DelegateAccessEnabled
$DelegateAccessEnabled
}
} # End of DelegateAccessEnabled
function DirectFileAccessOnPrivateComputersEnabled {
write-host " "
write-host "Direct File Access On Private Computers Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).DirectFileAccessOnPrivateComputersEnabled
write-host " "
write-host "Change Direct File Access On Private Computers Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Direct File Access On Private Computers Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DirectFileAccessOnPrivateComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DirectFileAccessOnPrivateComputersEnabled $false }
write-host " "
write-host "Direct File Access On Private Computers Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$DirectFileAccessOnPrivateComputersEnabled = $value.DirectFileAccessOnPrivateComputersEnabled
$DirectFileAccessOnPrivateComputersEnabled
}
} # End of DirectFileAccessOnPrivateComputersEnabled
function DirectFileAccessOnPublicComputersEnabled {
write-host " "
write-host "Direct File Access On Public Computers Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).DirectFileAccessOnPublicComputersEnabled
write-host " "
write-host "Change Direct File Access On Public Computers Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Direct File Access On Public Computers Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DirectFileAccessOnPublicComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DirectFileAccessOnPublicComputersEnabled $false }
write-host " "
write-host "Direct File Access On Public Computers Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$DirectFileAccessOnPublicComputersEnabled = $value.DirectFileAccessOnPublicComputersEnabled
$DirectFileAccessOnPublicComputersEnabled
}
} # End of DirectFileAccessOnPublicComputersEnabled
function DisplayPhotosEnabled {
write-host " "
write-host "Display Photos Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).DisplayPhotosEnabled
write-host " "
write-host "Change Display Photos Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Display Photos Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DisplayPhotosEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DisplayPhotosEnabled $false }
write-host " "
write-host "Display Photos Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$DisplayPhotosEnabled = $value.DisplayPhotosEnabled
$DisplayPhotosEnabled
}
} # End of DisplayPhotosEnabled
function DomainController {
write-host " "
write-host "Domain Controller - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).DomainController
write-host " "
write-host "Change Domain Controller Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Domain Controller to a FQDN "
get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -DomainController $answer
write-host " "
write-host "Domain Controller - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$DomainController = $value.DomainController
$DomainController
}
} # End of DomainController
function ExplicitLogonEnabled {
write-host " "
write-host "Explicit Logon Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ExplicitLogonEnabled
write-host " "
write-host "Change Explicit Logon Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Explicit Logon Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ExplicitLogonEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ExplicitLogonEnabled $false }
write-host " "
write-host "Explicit Logon Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ExplicitLogonEnabled = $value.ExplicitLogonEnabled
$ExplicitLogonEnabled
}
} # End of ExplicitLogonEnabled
function FacebookEnabled {
write-host " "
write-host "Facebook Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).FacebookEnabled
write-host " "
write-host "Change Facebook Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Facebook Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -FacebookEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -FacebookEnabled $false }
write-host " "
write-host "Facebook Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$FacebookEnabled = $value.FacebookEnabled
$FacebookEnabled
}
} # End of FacebookEnabled
function ForceSaveAttachmentFilteringEnabled {
write-host " "
write-host "Force Save Attachment Filtering Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ForceSaveAttachmentFilteringEnabled
write-host " "
write-host "Change Force Save Attachment Filtering Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Force Save Attachment Filtering Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceSaveAttachmentFilteringEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceSaveAttachmentFilteringEnabled $false }
write-host " "
write-host "Force Save Attachment Filtering Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ForceSaveAttachmentFilteringEnabled = $value.ForceSaveAttachmentFilteringEnabled
$ForceSaveAttachmentFilteringEnabled
}
} # End of ForceSaveAttachmentFilteringEnabled
function ForceWacViewingFirstOnPrivateComputers {
write-host " "
write-host "Force Wac Viewing First On Private Computers - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ForceWacViewingFirstOnPrivateComputers
write-host " "
write-host "Change Force Wac Viewing First On Private Computers Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Force Wac Viewing First On Private Computers to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWacViewingFirstOnPrivateComputers $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWacViewingFirstOnPrivateComputers $false }
write-host " "
write-host "Force Wac Viewing First On Private Computers - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ForceWacViewingFirstOnPrivateComputers = $value.ForceWacViewingFirstOnPrivateComputers
$ForceWacViewingFirstOnPrivateComputers
}
} # End of ForceWacViewingFirstOnPrivateComputers
function ForceWacViewingFirstOnPublicComputers {
write-host " "
write-host "Force Wac Viewing First On Public Computers - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ForceWacViewingFirstOnPublicComputers
write-host " "
write-host "Change Force Wac Viewing First On Public Computers Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Force Wac Viewing First On Public Computers to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWacViewingFirstOnPublicComputers $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWacViewingFirstOnPublicComputers $false }
write-host " "
write-host "Force Wac Viewing First On Public Computers - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ForceWacViewingFirstOnPublicComputers = $value.ForceWacViewingFirstOnPublicComputers
$ForceWacViewingFirstOnPublicComputers
}
} # End of ForceWacViewingFirstOnPublicComputers
function ForceWebReadyDocumentViewingFirstOnPrivateComputers {
write-host " "
write-host "Force Web Ready Document Viewing First On Private Computers - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ForceWebReadyDocumentViewingFirstOnPrivateComputers
write-host " "
write-host "Change Force Web Ready Document Viewing First On Private Computers Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Force Web Ready Document Viewing First On Private Computers to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWebReadyDocumentViewingFirstOnPrivateComputers $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWebReadyDocumentViewingFirstOnPrivateComputers $false }
write-host " "
write-host "Force Web Ready Document Viewing First On Private Computers - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ForceWebReadyDocumentViewingFirstOnPrivateComputers = $value.ForceWebReadyDocumentViewingFirstOnPrivateComputers
$ForceWebReadyDocumentViewingFirstOnPrivateComputers
}
} # End of ForceWebReadyDocumentViewingFirstOnPrivateComputers
function ForceWebReadyDocumentViewingFirstOnPublicComputers {
write-host " "
write-host "Force Web Ready Document Viewing First On Public Computers - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ForceWebReadyDocumentViewingFirstOnPublicComputers
write-host " "
write-host "Change Force Web Ready Document Viewing First On Public Computers Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Force Web Ready Document Viewing First On Public Computers to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWebReadyDocumentViewingFirstOnPublicComputers $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ForceWebReadyDocumentViewingFirstOnPublicComputers $false }
write-host " "
write-host "Force Web Ready Document Viewing First On Public Computers - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ForceWebReadyDocumentViewingFirstOnPublicComputers = $value.ForceWebReadyDocumentViewingFirstOnPublicComputers
$ForceWebReadyDocumentViewingFirstOnPublicComputers
}
} # End of ForceWebReadyDocumentViewingFirstOnPublicComputers
function GlobalAddressListEnabled {
write-host " "
write-host "Global Address List Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).GlobalAddressListEnabled
write-host " "
write-host "Change Global Address List Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Global Address List Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -GlobalAddressListEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -GlobalAddressListEnabled $false }
write-host " "
write-host "Global Address List Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$GlobalAddressListEnabled = $value.GlobalAddressListEnabled
$GlobalAddressListEnabled
}
} # End of GlobalAddressListEnabled
function InstantMessagingEnabled {
write-host " "
write-host "Instant Messaging Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).InstantMessagingEnabled
write-host " "
write-host "Change Instant Messaging Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Instant Messaging Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -InstantMessagingEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -InstantMessagingEnabled $false }
write-host " "
write-host "Instant Messaging Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$InstantMessagingEnabled = $value.InstantMessagingEnabled
$InstantMessagingEnabled
}
} # End of InstantMessagingEnabled
function InstantMessagingType {
write-host " "
write-host "Instant Messaging Type - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).InstantMessagingType
write-host " "
write-host "Change Instant Messaging Type Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Instant Messaging Type to (n) None, (o) Ocs or (m) Msn"
if ($answer -eq "n") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -InstantMessagingType none }
if ($answer -eq "o") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -InstantMessagingType OCS }
if ($answer -eq "m") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -InstantMessagingType msn }
write-host " "
write-host "Instant Messaging Type - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$InstantMessagingType = $value.InstantMessagingType
$InstantMessagingType
}
} # End of InstantMessagingType
function IRMEnabled {
write-host " "
write-host "IRM Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).IRMEnabled
write-host " "
write-host "Change IRM Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set IRM Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -IRMEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -IRMEnabled $false }
write-host " "
write-host "IRM Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$IRMEnabled = $value.IRMEnabled
$IRMEnabled
}
} # End of IRMEnabled
# Configure General Setting
function isdefault {
write-host " "
write-host "Is Default - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).IsDefault
write-host " "
write-host "Change the IsDefault value? [y or n] " -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set IsDefault to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -isdefault $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -isdefault $false }
write-host " "
write-host "Is Default - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$IsDefault = $value.IsDefault
$IsDefault
}
} # End of IsDefault function
function JournalEnabled {
write-host " "
write-host "Journal Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).JournalEnabled
write-host " "
write-host "Change Journal Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Journal Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -JournalEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -JournalEnabled $false }
write-host " "
write-host "Journal Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$JournalEnabled = $value.JournalEnabled
$JournalEnabled
}
} # End of JournalEnabled
function JunkEmailEnabled {
write-host " "
write-host "Junk Email Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).JunkEmailEnabled
write-host " "
write-host "Change Junk Email Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Junk Email Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -JunkEmailEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -JunkEmailEnabled $false }
write-host " "
write-host "Junk Email Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$JunkEmailEnabled = $value.JunkEmailEnabled
$JunkEmailEnabled
}
} # End of JunkEmailEnabled
function Name {
write-host " "
write-host "Policy Name - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).Name
write-host " "
write-host "Change Policy Name? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "What is the new name for the policy"
get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -IsDefault $answer
write-host " "
write-host "Policy Name - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$name = $value.name
$name
}
} # End of Name funciton
function NotesEnabled {
write-host " "
write-host "Notes Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).NotesEnabled
write-host " "
write-host "Change Notes Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Notes Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -NotesEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -NotesEnabled $false }
write-host " "
write-host "Notes Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$NotesEnabled = $value.NotesEnabled
$NotesEnabled
}
} # End of NotesEnabled
function OrganizationEnabled {
write-host " "
write-host "Organization Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).OrganizationEnabled
write-host " "
write-host "Change Organization Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Organization Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -OrganizationEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -OrganizationEnabled $false }
write-host " "
write-host "Organization Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$OrganizationEnabled = $value.OrganizationEnabled
$OrganizationEnabled
}
} # End of OrganizationEnabled
function OutboundCharset {
write-host " "
write-host "Outbound Charset - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).OutboundCharset
write-host " "
write-host "Change Outbound Charset Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Outbound Charset to (1) AlwaysUTF8, (2) AutoDetect or (3) UserLanguageChoice"
if ($answer -eq "1") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -OutboundCharset AlwaysUTF8 }
if ($answer -eq "2") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -OutboundCharset AutoDetect }
if ($answer -eq "3") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -OutboundCharset UserLanguageChoice }
write-host " "
write-host "Outbound Charset - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$OutboundCharset = $value.OutboundCharset
$OutboundCharset
}
} # End of OutboundCharset
function OWALightEnabled {
write-host " "
write-host "OWA Light Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).OWALightEnabled
write-host " "
write-host "Change OWA Light Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set OWA Light Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -OWALightEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -OWALightEnabled $false }
write-host " "
write-host "OWA Light Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$OWALightEnabled = $value.OWALightEnabled
$OWALightEnabled
}
} # End of OWALightEnabled
function PhoneticSupportEnabled {
write-host " "
write-host "Phonetic Support Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).PhoneticSupportEnabled
write-host " "
write-host "Change Phonetic Support Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Phonetic Support Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -PhoneticSupportEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -PhoneticSupportEnabled $false }
write-host " "
write-host "Phonetic Support Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$PhoneticSupportEnabled = $value.PhoneticSupportEnabled
$PhoneticSupportEnabled
}
} # End of PhoneticSupportEnabled
function PredictedActionsEnabled {
write-host " "
write-host "Predicted Actions Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).PredictedActionsEnabled
write-host " "
write-host "Change Predicted Actions Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Predicted Actions Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -PredictedActionsEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -PredictedActionsEnabled $false }
write-host " "
write-host "Predicted Actions Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$PredictedActionsEnabled = $value.PredictedActionsEnabled
$PredictedActionsEnabled
}
} # End of PredictedActionsEnabled
function PublicFoldersEnabled {
write-host " "
write-host "Public Folders Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).PublicFoldersEnabled
write-host " "
write-host "Change Public Folders Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Public Folders Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -PublicFoldersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -PublicFoldersEnabled $false }
write-host " "
write-host "Public Folders Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$PublicFoldersEnabled = $value.PublicFoldersEnabled
$PublicFoldersEnabled
}
} # End of PublicFoldersEnabled
function RecoverDeletedItemsEnabled {
write-host " "
write-host "Recover Deleted Items Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).RecoverDeletedItemsEnabled
write-host " "
write-host "Change Recover Deleted Items Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Recover Deleted Items Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -RecoverDeletedItemsEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -RecoverDeletedItemsEnabled $false }
write-host " "
write-host "Recover Deleted Items Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$RecoverDeletedItemsEnabled = $value.RecoverDeletedItemsEnabled
$RecoverDeletedItemsEnabled
}
} # End of RecoverDeletedItemsEnabled
function RemindersAndNotificationsEnabled {
write-host " "
write-host "Reminders And Notifications Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).RemindersAndNotificationsEnabled
write-host " "
write-host "Change Reminders And Notifications Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Reminders And Notifications Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -RemindersAndNotificationsEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -RemindersAndNotificationsEnabled $false }
write-host " "
write-host "Reminders And Notifications Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$RemindersAndNotificationsEnabled = $value.RemindersAndNotificationsEnabled
$RemindersAndNotificationsEnabled
}
} # End of RemindersAndNotificationsEnabled
function ReportJunkEmailEnabled {
write-host " "
write-host "Report Junk Email Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ReportJunkEmailEnabled
write-host " "
write-host "Change Report Junk Email Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Report Junk Email Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ReportJunkEmailEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ReportJunkEmailEnabled $false }
write-host " "
write-host "Report Junk Email Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ReportJunkEmailEnabled = $value.ReportJunkEmailEnabled
$ReportJunkEmailEnabled
}
} # End of ReportJunkEmailEnabled
function RulesEnabled {
write-host " "
write-host "Rules Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).RulesEnabled
write-host " "
write-host "Change Rules Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Rules Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -RulesEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -RulesEnabled $false }
write-host " "
write-host "Rules Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$RulesEnabled = $value.RulesEnabled
$RulesEnabled
}
} # End of RulesEnabled
function SearchFoldersEnabled {
write-host " "
write-host "Search Folders Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).SearchFoldersEnabled
write-host " "
write-host "Change Search Folders Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Search Folders Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SearchFoldersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SearchFoldersEnabled $false }
write-host " "
write-host "Search Folders Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$SearchFoldersEnabled = $value.SearchFoldersEnabled
$SearchFoldersEnabled
}
} # End of SearchFoldersEnabled
function SetPhotoEnabled {
write-host " "
write-host "Set Photo Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).SetPhotoEnabled
write-host " "
write-host "Change Set Photo Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Set Photo Enabled to (t) True or (f) False"
if ($answer -eq "t") {$SetPhotoURL = read-host "Specify the location of the user photos (URL)";get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SetPhotoEnabled $true -SetPhotoURL $SetPhotoURL }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SetPhotoEnabled $false }
write-host " "
write-host "Set Photo Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$SetPhotoEnabled = $value.SetPhotoEnabled
$SetPhotoEnabled
}
} # End of SetPhotoEnabled
function SignaturesEnabled {
write-host " "
write-host "Signatures Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).SignaturesEnabled
write-host " "
write-host "Change Signatures Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Signatures Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SignaturesEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SignaturesEnabled $false }
write-host " "
write-host "Signatures Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$SignaturesEnabled = $value.SignaturesEnabled
$SignaturesEnabled
}
} # End of SignaturesEnabled
function SilverlightEnabled {
write-host " "
write-host "Silverlight Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).SilverlightEnabled
write-host " "
write-host "Change Silverlight Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Silverlight Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SilverlightEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SilverlightEnabled $false }
write-host " "
write-host "Silverlight Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$SilverlightEnabled = $value.SilverlightEnabled
$SilverlightEnabled
}
} # End of SilverlightEnabled
function SkipCreateUnifiedGroupCustomSharepointClassification {
write-host " "
write-host "Skip Create Unified Group Custom Sharepoint Classification - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).SkipCreateUnifiedGroupCustomSharepointClassification
write-host " "
write-host "Change Skip Create Unified Group Custom Sharepoint Classification Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Skip Create Unified Group Custom Sharepoint Classification to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SkipCreateUnifiedGroupCustomSharepointClassification $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SkipCreateUnifiedGroupCustomSharepointClassification $false }
write-host " "
write-host "Skip Create Unified Group Custom Sharepoint Classification - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$SkipCreateUnifiedGroupCustomSharepointClassification = $value.SkipCreateUnifiedGroupCustomSharepointClassification
$SkipCreateUnifiedGroupCustomSharepointClassification
}
} # End of SkipCreateUnifiedGroupCustomSharepointClassification
function SMimeEnabled {
write-host " "
write-host "Smime Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).SMimeEnabled
write-host " "
write-host "Change Smime Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Smime Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SMimeEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -SMimeEnabled $false }
write-host " "
write-host "Smime Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$SMimeEnabled = $value.SMimeEnabled
$SMimeEnabled
}
} # End of SMimeEnabled
function TasksEnabled {
write-host " "
write-host "Tasks Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).TasksEnabled
write-host " "
write-host "Change Tasks Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Tasks Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -TasksEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -TasksEnabled $false }
write-host " "
write-host "Tasks Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$TasksEnabled = $value.TasksEnabled
$TasksEnabled
}
} # End of TasksEnabled
function TextMessagingEnabled {
write-host " "
write-host "Text Messaging Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).TextMessagingEnabled
write-host " "
write-host "Change Text Messaging Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Text Messaging Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -TextMessagingEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -TextMessagingEnabled $false }
write-host " "
write-host "Text Messaging Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$TextMessagingEnabled = $value.TextMessagingEnabled
$TextMessagingEnabled
}
} # End of TextMessagingEnabled
function ThemeSelectionEnabled {
write-host " "
write-host "Theme Selection Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).ThemeSelectionEnabled
write-host " "
write-host "Change Theme Selection Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Theme Selection Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ThemeSelectionEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -ThemeSelectionEnabled $false }
write-host " "
write-host "Theme Selection Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$ThemeSelectionEnabled = $value.ThemeSelectionEnabled
$ThemeSelectionEnabled
}
} # End of ThemeSelectionEnabled
function UMIntegrationEnabled {
write-host " "
write-host "UM Integration Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).UMIntegrationEnabled
write-host " "
write-host "Change UM Integration Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set UM Integration Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UMIntegrationEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UMIntegrationEnabled $false }
write-host " "
write-host "UM Integration Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$UMIntegrationEnabled = $value.UMIntegrationEnabled
$UMIntegrationEnabled
}
} # End of UMIntegrationEnabled
function UNCAccessOnPrivateComputersEnabled {
write-host " "
write-host "UNC Access On Private Computers Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).UNCAccessOnPrivateComputersEnabled
write-host " "
write-host "Change UNC Access On Private Computers Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set UNC Access On Private Computers Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UNCAccessOnPrivateComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UNCAccessOnPrivateComputersEnabled $false }
write-host " "
write-host "UNC Access On Private Computers Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$UNCAccessOnPrivateComputersEnabled = $value.UNCAccessOnPrivateComputersEnabled
$UNCAccessOnPrivateComputersEnabled
}
} # End of UNCAccessOnPrivateComputersEnabled
function UNCAccessOnPublicComputersEnabled {
write-host " "
write-host "UNC Access On Public Computers Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).UNCAccessOnPublicComputersEnabled
write-host " "
write-host "Change UNC Access On Public Computers Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set UNC Access On Public Computers Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UNCAccessOnPublicComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UNCAccessOnPublicComputersEnabled $false }
write-host " "
write-host "UNC Access On Public Computers Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$UNCAccessOnPublicComputersEnabled = $value.UNCAccessOnPublicComputersEnabled
$UNCAccessOnPublicComputersEnabled
}
} # End of UNCAccessOnPublicComputersEnabled
function UseGB18030 {
write-host " "
write-host "UseGB 18030 - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).UseGB18030
write-host " "
write-host "Change UseGB 18030 Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set UseGB 18030 to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UseGB18030 $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UseGB18030 $false }
write-host " "
write-host "UseGB 18030 - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$UseGB18030 = $value.UseGB18030
$UseGB18030
}
} # End of UseGB18030
function UseISO885915 {
write-host " "
write-host "Use ISO 885915 - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).UseISO885915
write-host " "
write-host "Change Use ISO 885915 Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Use ISO 885915 to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UseISO885915 $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -UseISO885915 $false }
write-host " "
write-host "Use ISO 885915 - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$UseISO885915 = $value.UseISO885915
$UseISO885915
}
} # End of UseISO885915
function WacExternalServicesEnabled {
write-host " "
write-host "Wac External Services Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WacExternalServicesEnabled
write-host " "
write-host "Change Wac External Services Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Wac External Services Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacExternalServicesEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacExternalServicesEnabled $false }
write-host " "
write-host "Wac External Services Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WacExternalServicesEnabled = $value.WacExternalServicesEnabled
$WacExternalServicesEnabled
}
} # End of WacExternalServicesEnabled
function WacOMEXEnabled {
write-host " "
write-host "Wac OMEX Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WacOMEXEnabled
write-host " "
write-host "Change Wac OMEX Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Wac OMEX Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacOMEXEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacOMEXEnabled $false }
write-host " "
write-host "Wac OMEX Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WacOMEXEnabled = $value.WacOMEXEnabled
$WacOMEXEnabled
}
} # End of WacOMEXEnabled
function WacViewingOnPrivateComputersEnabled {
write-host " "
write-host "Wac Viewing On Private Computers Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WacViewingOnPrivateComputersEnabled
write-host " "
write-host "Change Wac Viewing On Private Computers Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Wac Viewing On Private Computers Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacViewingOnPrivateComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacViewingOnPrivateComputersEnabled $false }
write-host " "
write-host "Wac Viewing On Private Computers Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WacViewingOnPrivateComputersEnabled = $value.WacViewingOnPrivateComputersEnabled
$WacViewingOnPrivateComputersEnabled
}
} # End of WacViewingOnPrivateComputersEnabled
function WacViewingOnPublicComputersEnabled {
write-host " "
write-host "Wac Viewing On Public Computer sEnabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WacViewingOnPublicComputersEnabled
write-host " "
write-host "Change Wac Viewing On Public Computer sEnabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Wac Viewing On Public Computer sEnabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacViewingOnPublicComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WacViewingOnPublicComputersEnabled $false }
write-host " "
write-host "Wac Viewing On Public Computer sEnabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WacViewingOnPublicComputersEnabled = $value.WacViewingOnPublicComputersEnabled
$WacViewingOnPublicComputersEnabled
}
} # End of WacViewingOnPublicComputersEnabled
function WebPartsFrameOptionsType {
write-host " "
# Web Parts Frame Options Type
write-host "Web Parts Frame Options Type - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).OwaMailboxPolicy
write-host " "
write-host "Change Web Parts Frame Options Type Value? [y or n] " -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Web Parts Frame Options Type to (d) Deny, (a) AllowFrom, (n) None or (s) SameOrigin"
if ($answer -eq "d") {get-OwaMailboxPolicy | set-OwaMailboxPolicy -WebPartsFrameOptionsType Deny }
if ($answer -eq "a") {get-OwaMailboxPolicy | set-OwaMailboxPolicy -WebPartsFrameOptionsType Allow From }
if ($answer -eq "n") {get-OwaMailboxPolicy | set-OwaMailboxPolicy -WebPartsFrameOptionsType None }
if ($answer -eq "s") {get-OwaMailboxPolicy | set-OwaMailboxPolicy -WebPartsFrameOptionsType Same Origin }
write-host " "
write-host "Web Parts Frame Options Type - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$OwaMailboxPolicy = $value.OwaMailboxPolicy
$OwaMailboxPolicy
}
} # End of Web Parts Frame Options Type
function WebReadyDocumentViewingForAllSupportedTypes {
write-host " "
write-host "Web Ready Document Viewing For All Supported Types - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WebReadyDocumentViewingForAllSupportedTypes
write-host " "
write-host "Change Web Ready Document Viewing For All Supported Types Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Web Ready Document Viewing For All Supported Types to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingForAllSupportedTypes $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingForAllSupportedTypes $false }
write-host " "
write-host "Web Ready Document Viewing For All Supported Types - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WebReadyDocumentViewingForAllSupportedTypes = $value.WebReadyDocumentViewingForAllSupportedTypes
$WebReadyDocumentViewingForAllSupportedTypes
}
} # End of WebReadyDocumentViewingForAllSupportedTypes
function WebReadyDocumentViewingOnPrivateComputersEnabled {
write-host " "
write-host "Web Ready Document Viewing On Private Computers Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WebReadyDocumentViewingOnPrivateComputersEnabled
write-host " "
write-host "Change Web Ready Document Viewing On Private Computers Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Web Ready Document Viewing On Private Computers Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingOnPrivateComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingOnPrivateComputersEnabled $false }
write-host " "
write-host "Web Ready Document Viewing On Private Computers Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WebReadyDocumentViewingOnPrivateComputersEnabled = $value.WebReadyDocumentViewingOnPrivateComputersEnabled
$WebReadyDocumentViewingOnPrivateComputersEnabled
}
} # End of WebReadyDocumentViewingOnPrivateComputersEnabled
function WebReadyDocumentViewingOnPublicComputersEnabled {
write-host " "
write-host "Web Ready Document Viewing On Public Computers Enabled - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WebReadyDocumentViewingOnPublicComputersEnabled
write-host " "
write-host "Change Web Ready Document Viewing On Public Computers Enabled Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Web Ready Document Viewing On Public Computers Enabled to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingOnPublicComputersEnabled $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingOnPublicComputersEnabled $false }
write-host " "
write-host "Web Ready Document Viewing On Public Computers Enabled - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WebReadyDocumentViewingOnPublicComputersEnabled = $value.WebReadyDocumentViewingOnPublicComputersEnabled
$WebReadyDocumentViewingOnPublicComputersEnabled
}
} # End of WebReadyDocumentViewingOnPublicComputersEnabled
function WebReadyDocumentViewingSupportedFileTypes {
write-host " "
write-host "Web Ready Document Viewing Supported File Types - Before:" -foregroundcolor green
(Get-OwaMailboxPolicy $policy).WebReadyDocumentViewingSupportedFileTypes
write-host " "
write-host "Change Web Ready Document Viewing Supported File Types Value? [y or n]" -nonewline -ForegroundColor yellow; $set = read-host
if ($set -eq "y") {
$answer = read-host "Set Web Ready Document Viewing Supported File Types to (t) True or (f) False"
if ($answer -eq "t") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingSupportedFileTypes $true }
if ($answer -eq "f") {get-OwaMailboxPolicy $policy | set-OwaMailboxPolicy -WebReadyDocumentViewingSupportedFileTypes $false }
write-host " "
write-host "Web Ready Document Viewing Supported File Types - After:" -foregroundcolor cyan
$value = Get-OwaMailboxPolicy $policy
$WebReadyDocumentViewingSupportedFileTypes = $value.WebReadyDocumentViewingSupportedFileTypes
$WebReadyDocumentViewingSupportedFileTypes
}
} # End of WebReadyDocumentViewingSupportedFileTypes
Do {
if ($opt -ne "None") {Write-Host "Last command: "$opt -foregroundcolor Yellow}
$opt = Read-Host $menu
switch ($opt) {
c {write-host " "; write-host "OWA Mailbox Policies:" -ForegroundColor cyan;(Get-OWAMailboxPolicy).name
write-host " ";write-host "Which policy would you like to modify? "-ForegroundColor green -NoNewline
[string]$policy = read-host
$value = Get-OwaMailboxPolicy $policy }
1 { ActionForUnknownFileAndMIMETypes }
2 { ActiveSyncIntegrationEnabled }
3 { AllAddressListsEnabled }
4 { AllowCopyContactsToDeviceAddressBook }
5 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# AllowedFileTypes
}
6 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# AllowedMimeTypes
}
7 { AllowOfflineOn }
8 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# BlockedFileTypes
}
9 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# BlockedMimeTypes
}
10 { CalendarEnabled }
11 { ChangePasswordEnabled }
12 { ContactsEnabled }
13 { write-host "Not available. Sorry." -ForegroundColor red; write-host " "
# DefaultTheme
}
14 { DelegateAccessEnabled }
15 { DirectFileAccessOnPrivateComputersEnabled }
16 { DirectFileAccessOnPublicComputersEnabled }
17 { DisplayPhotosEnabled }
18 { ExplicitLogonEnabled }
19 { FacebookEnabled }
20 { ForceSaveAttachmentFilteringEnabled }
21 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# ForceSaveFileTypes
}
22 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# ForceSaveMimeTypes
}
23 { ForceWacViewingFirstOnPrivateComputers }
24 { ForceWacViewingFirstOnPublicComputers }
25 { ForceWebReadyDocumentViewingFirstOnPrivateComputers }
26 { ForceWebReadyDocumentViewingFirstOnPublicComputers }
27 { GlobalAddressListEnabled }
28 { InstantMessagingEnabled }
29 { InstantMessagingType }
30 { IRMEnabled }
31 { IsDefault }
32 { IsValid }
33 { JournalEnabled }
34 { JunkEmailEnabled }
35 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# LogonAndErrorLanguage
}
36 { Name }
37 { NotesEnabled }
38 { OrganizationEnabled }
39 { OrganizationId }
40 { OutboundCharset }
41 { OWALightEnabled }
42 { PhoneticSupportEnabled }
43 { PredictedActionsEnabled }
44 { PublicFoldersEnabled }
45 { RecoverDeletedItemsEnabled }
46 { RemindersAndNotificationsEnabled }
47 { ReportJunkEmailEnabled }
48 { RulesEnabled }
49 { SearchFoldersEnabled }
50 { SetPhotoEnabled # and Photo URL
}
51 { SignaturesEnabled }
52 { SilverlightEnabled }
53 { SkipCreateUnifiedGroupCustomSharepointClassification }
54 { SMimeEnabled }
55 { TasksEnabled }
56 { TextMessagingEnabled }
57 { ThemeSelectionEnabled }
58 { UMIntegrationEnabled }
69 { UNCAccessOnPrivateComputersEnabled }
60 { UNCAccessOnPublicComputersEnabled }
61 { UseGB18030 }
62 { UseISO885915 }
63 { WacExternalServicesEnabled }
64 { WacOMEXEnabled }
65 { WacViewingOnPrivateComputersEnabled }
66 { WacViewingOnPublicComputersEnabled }
67 { WebPartsFrameOptionsType }
68 { WebReadyDocumentViewingForAllSupportedTypes }
69 { WebReadyDocumentViewingOnPrivateComputersEnabled }
70 { WebReadyDocumentViewingOnPublicComputersEnabled }
71 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
#WebReadyDocumentViewingSupportedFileTypes
}
72 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
#WebReadyDocumentViewingSupportedMimeTypes
}
73 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# WebReadyFileTypes
}
74 { write-host "Not available. Sorry." -ForegroundColor red;write-host " "
# WebReadyMimeTypes
}
98 {# Exit and restart
Stop-Transcript
restart-computer -computername localhost -force
}
99 {# Exit
popd
Write-Host "Exiting..."
Stop-Transcript
}
default {Write-Host "You haven't selected any of the available options. "}
}
} while ($opt -ne 99)
Notes
This script and a few of the previous scripts I’ve written will be posted to the TechNet Gallery this week. Also, if anyone has any comments, suggestions or requests, please feel free to place a comment here.
Skipped Switches – for now
MultiValuedProperty or Other
- AllowedFileTypes
- AllowedMimeTypes
- BlockedFileTypes
- BlockedMimeTypes
- ForceSaveFileTypes
- ForceSaveMimeTypes
- LogonAndErrorLanguage
- WebReadyDocumentViewingSupportedFileTypes
- WebReadyDocumentViewingSupportedMimeTypes
- WebReadyFileTypes
- WebReadyMimeTypes
Cloud Only
- DisableFacebook
- LinkedInEnabled
Internal – MS
- GroupCreationEnabled
- PlacesEnabled
- UserDiagnosticEnabled
- WeatherEnabled
Deprecated
- PremiumClientEnabled
- SpellCheckerEnabled
- WSSAccessOnPublicComputersEnabled
- WSSAccessOnPrivateComputersEnabled
