Adding an exception to existing retention policy

Iron Contributor

We have a retention policy in place that covers all SharePoint Online sites. I want to exclude a specific site from this policy, but if I add a site to the "Exclude sites" it looks like it removes the "All" sites (see screenshot). 

 

Is it not possible to create a "include all sites except these sites" policy using the GUI?

7 Replies

Hi Jakob,

 

@Juan Carlos González Martínwould be good to answer this one. 

 

Best, Chris

Unfortunately, the retention policy UI does not work in that way so you can only apply to all the sites or indicate the sites you want it to be applied

Thanks, Juan.

 

Can I instead add all sites in the GUI and the add exceptions using Powershell?

No,
What you can do through PowerShell is automate where you want to apply the retention policies in a less consuming task compared to use the UI. I will follow the bellow approach:
1) Create a list of the SPO sites where you want to apply the retention policy and store it in a CSV file
2) Iterate through the SPO sites list and use the Set-RetentionCompliancePolicy so each site is added to the scope of the policy https://docs.microsoft.com/en-us/powershell/module/exchange/policy-and-compliance-retention/set-rete...

Um, I don't believe it "removes" the All sites, it simply grays it out in the UI, but it still applies. Here's an example of one such policy I have created and adjusted with a single excluded site:

 

C:\> Get-RetentionCompliancePolicy RPTest -DistributionDetail |ft Name,Sharep*

Name   SharePointLocation SharePointLocationException
----   ------------------ ---------------------------
RPtest {All}              {Сайт на екип}

@Christopher Hoard  Hello 

I created a retention policy from the Security and Compliance center. I added some sites to the exclude list, I would like to remove some of the  sites from the "exclude "list but am unable to remove the site from the exclude list . 

I get an error message anytime I try it 

 

I need help please 

Thank You 

All,

How do we add exception to a retention policy for Exchange online mailboxes for a set of users? It seems like the exclusion doesn't work? any Powershell way with a csv file?