Copy an Outlook on the Web Policy with Exchange Online PowerShell
Question details
Create an Outlook on the web mailbox policy that preserves the custom settings of an existing policy and adds a profile photo restriction.

- Product
- Exchange Online PowerShell and Outlook on the web
- Device & OS
- not provided
- Scenario
- An Exchange Online administrator wants a new policy based on an existing default policy before assigning it to mailboxes synchronized from on-premises Active Directory.
- Observed behavior
- The new policy should retain the existing customizations and prevent users from changing profile photos through Outlook on the web.
Identify the existing policy name and choose a unique name for the new policy. Install the Exchange Online PowerShell module if needed, and sign in with an account permitted to manage Outlook on the web mailbox policies.
Re-create the policy settings with Exchange Online PowerShell
Use this method to preserve the existing policy's custom settings before adding the photo restriction.
Creating a policy does not automatically copy the source policy's customizations. Review the source settings and explicitly apply the writable settings you need to the new policy; do not pass the entire retrieved object to Set-OwaMailboxPolicy.
Directory synchronization does not replace these Exchange Online policy steps. The photo setting controls the Outlook on the web policy; check other Microsoft 365 services separately if you need to restrict photo changes across all interfaces.
Open PowerShell and run `Connect-ExchangeOnline`. If the module is not installed, first run `Install-Module ExchangeOnlineManagement -Scope CurrentUser`, then sign in when prompted.
Run `Get-OwaMailboxPolicy -Identity "Existing Policy" | Format-List *` and record its customized values. Run `(Get-Command Set-OwaMailboxPolicy).Parameters.Keys` to check which settings can be configured with the setter.
Run `New-OwaMailboxPolicy -Name "New Policy"`. Replace the example name with the name you chose.
Use `Set-OwaMailboxPolicy -Identity "New Policy"` with the applicable writable parameter names and values recorded from the source policy. Apply all relevant custom settings, including any list values, rather than assuming the new policy inherited them.
Run `Set-OwaMailboxPolicy -Identity "New Policy" -SetPhotoEnabled $false` to disable profile photo changes through Outlook on the web.
Run `Get-OwaMailboxPolicy -Identity "New Policy" | Format-List *` and compare it with the source, allowing for the intended name and photo-setting differences. After verification, assign it with `Set-CASMailbox -Identity "user@example.com" -OwaMailboxPolicy "New Policy"` and check the assignment with `Get-CASMailbox -Identity "user@example.com" | Format-List OwaMailboxPolicy`.

Document Exchange Policy Changes with WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility. Use it to document policy settings and move existing documents and spreadsheets into your workflow; Exchange Online PowerShell is still required to manage the policy.

Frequently Asked Questions
Does creating a new Outlook on the web policy copy the default policy?
No. Run `Get-OwaMailboxPolicy -Identity "Existing Policy" | Format-List *` to inspect the source, then use `Set-OwaMailboxPolicy` to apply its relevant writable custom settings to the new policy.
How do I stop users from changing their photos in Outlook on the web?
Run `Set-OwaMailboxPolicy -Identity "New Policy" -SetPhotoEnabled $false`, then assign the policy to the intended mailboxes. Check other Microsoft 365 services separately if photo changes must also be restricted there.
How can I check which policy a mailbox uses?
Run `Get-CASMailbox -Identity "user@example.com" | Format-List OwaMailboxPolicy` in an Exchange Online PowerShell session.
Can I copy every property returned by Get-OwaMailboxPolicy?
Not necessarily. Some properties are read-only or lack a matching setter parameter. Check `(Get-Command Set-OwaMailboxPolicy).Parameters.Keys` and apply the relevant supported settings explicitly.




