logo
search
Compliance Problems

How to Exclude More Than 100 SharePoint Sites from a Retention Policy

Algirdas JasaitisAlgirdas Jasaitis Oct 12, 2026 868 views

Question details

The user needs to exclude a large number (over 100) of SharePoint sites from a Microsoft Purview retention policy.

How to Exclude More Than 100 SharePoint Sites from a Retention Policy
Product
Microsoft Purview / SharePoint
Device & OS
not provided
Scenario
Managing compliance retention policies for a large scale of SharePoint sites.
Observed behavior
The Microsoft Purview interface restricts the number of SharePoint sites that can be selected for exclusion, preventing easy bulk administration through the GUI.
Before you start

Ensure you have the necessary administrative privileges in Microsoft Purview and access to Exchange Online PowerShell or the Security & Compliance PowerShell module.

Solution 1Recommended

Use PowerShell for Bulk Exclusions in Microsoft Purview

Since the visual interface restricts bulk site selection, using PowerShell is the most effective and officially supported way to exclude over 100 SharePoint sites simultaneously.

The Microsoft Purview compliance portal's web interface is optimized for smaller selections to maintain performance. To handle large-scale administrative tasks like excluding hundreds of URLs, you must use PowerShell administrative scripting.

1
Connect to PowerShell

Open your PowerShell terminal as an administrator and connect to the Security & Compliance PowerShell module using your global admin or compliance admin credentials.

2
Prepare Site URLs

Compile a list of the SharePoint site URLs you wish to exclude. For large volumes, it is best to save these URLs in a CSV file and import them into a PowerShell array variable.

3
Run the Exclusion Cmdlet

Use the Set-RetentionComplianceRule cmdlet along with the -AddSharePointLocationException parameter. Pass your array of site URLs to append them to the policy's exclusion list in bulk.

4
Verify Changes

Execute the Get-RetentionComplianceRule cmdlet to review the policy details and verify that the exclusions have been successfully applied and recognized by the system.

Use PowerShell for Bulk Exclusions in Microsoft Purview
Scripting Assistance: If you require specific script templates or encounter errors during bulk configuration, the Microsoft Q&A platform offers excellent scripting guidance and community support.
Free Microsoft Office alternative

Looking for a Simpler Way to Manage Your Office Documents?

While managing enterprise compliance policies like SharePoint retention requires complex administrative tools, creating and editing daily documents shouldn't be a hassle. WPS Office offers a free, lightweight, and user-friendly suite for all your document, spreadsheet, and presentation needs.

  1. 1. Download WPS Office: Visit the official WPS website and click the download button for your operating system.
  2. 2. Install the Software: Run the downloaded installer file and follow the quick on-screen instructions to set up the application.
  3. 3. Start Creating: Launch WPS Writer, Spreadsheet, or Presentation to immediately start working with your Office files seamlessly.
Fully compatible with Microsoft Office formats including .docx, .xlsx, and .pptx.Lightweight design that installs quickly and ensures fast startup on any device.Familiar, intuitive user interface for a seamless migration without any learning curve.Built-in PDF editing tools for comprehensive document management and sharing.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Microsoft Purview interface limit SharePoint site exclusions?

The web-based graphical user interface in Microsoft Purview is optimized for standard, day-to-day administrative tasks. Loading, rendering, and processing hundreds of site selections visually can cause performance degradation or timeouts, which is why PowerShell is the supported method for bulk actions.

Can I use a CSV file to exclude SharePoint sites via PowerShell?

Yes, utilizing a CSV file is highly recommended for bulk exclusions. You can list all your SharePoint site URLs in a CSV file, import it into your PowerShell session using the Import-Csv cmdlet, and loop through the data to apply exclusions programmatically.

Will excluding a SharePoint site delete its existing retained data?

Excluding a site from a retention policy simply stops the policy from applying to that site moving forward. It does not automatically delete the data. Instead, the data will become subject to the site's default deletion settings or any other retention policies that may still apply.