Usage
m365 spo tenant site archive [options]
Description
Archives a site collection
Options
Option
Description
-u, --url <url>
URL of the site collection.
-f, --force
Don't prompt for confirmation.
Examples
Archive a specific SharePoint site collection
m365 spo tenant site archive --url " https://contoso.sharepoint.com/sites/Marketing"
Archive a specific SharePoint site collection without confirmation prompt
m365 spo tenant site archive --url " https://contoso.sharepoint.com/sites/Marketing" --force
Default properties
No response
Additional Info
API request
Since the REST API request is an internal request, we prefer to use the CSOM request.
POST https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery
<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="<CLI app name>"
xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009">
<Actions>
<ObjectPath Id="2" ObjectPathId="1" />
<ObjectPath Id="4" ObjectPathId="3" />
<Query Id="5" ObjectPathId="3">
<Query SelectAllProperties="true">
<Properties />
</Query>
</Query>
</Actions>
<ObjectPaths>
<Constructor Id="1" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" />
<Method Id="3" ParentId="1" Name="ArchiveSiteByUrl">
<Parameters>
<Parameter Type="String">https://contoso.sharepoint.com/sites/Marketing</Parameter>
</Parameters>
</Method>
</ObjectPaths>
</Request>
Remarks
Note
Info admonition: To use this command you must be a Global or SharePoint administrator.
Additional info
Usage
m365 spo tenant site archive [options]
Description
Archives a site collection
Options
-u, --url <url>-f, --forceExamples
Archive a specific SharePoint site collection
m365 spo tenant site archive --url "https://contoso.sharepoint.com/sites/Marketing"Archive a specific SharePoint site collection without confirmation prompt
m365 spo tenant site archive --url "https://contoso.sharepoint.com/sites/Marketing" --forceDefault properties
No response
Additional Info
API request
Since the REST API request is an internal request, we prefer to use the CSOM request.
Remarks
Note
Info admonition: To use this command you must be a Global or SharePoint administrator.
Additional info