# Archive Site Collection

Archives or unarchives a SharePoint site collection by processing rows from an Excel file.

Filename pattern: filename must contain ArchiveSiteCollection (case-insensitive).
Example: 20240115 ArchiveSiteCollection close.xlsx

# Columns

Name Required Description
Url / DocLibUrl Conditional Server-relative URL of the site collection. Required when MatterCode is not provided.
MatterCode Conditional Matter code used to resolve the site URL from the matter list. Required when Url is not provided.
ClientCode No Client code used together with MatterCode to identify the matter.
Archive / Archiving No Boolean. true archives the site; false (or empty) unarchives it.

Either Url or MatterCode must be provided.

# Behavior

  • When Archive is true, the site is marked as archived (EnsureArchivedSite).
  • When Archive is false or not provided, the site is marked as active (EnsureActiveSite).
Last Updated: 4/20/2026, 12:54:05 PM