Skip to content

New command: spo tenant site unarchive #6019

@milanholemans

Description

@milanholemans

Usage

m365 spo tenant site unarchive [options]

Description

Unarchives a site collection

Options

Option Description
-u, --url <url> URL of the site collection.
-f, --force Don't prompt for confirmation.

Examples

Unarchive a specific site collection

m365 spo tenant site unarchive --url "https://contoso.sharepoint.com/sites/Marketing"

Unarchive a specific site collection without confirmation prompt

m365 spo tenant site unarchive --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="8" ObjectPathId="7" />
		<ObjectPath Id="10" ObjectPathId="9" />
		<Query Id="11" ObjectPathId="9">
			<Query SelectAllProperties="true">
				<Properties />
			</Query>
		</Query>
	</Actions>
	<ObjectPaths>
		<Constructor Id="7" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" />
		<Method Id="9" ParentId="7" Name="GetSitePropertiesByUrl">
			<Parameters>
				<Parameter Type="String">https://contoso.sharepoint.com/sites/Marketing</Parameter>
				<Parameter Type="Boolean">false</Parameter>
			</Parameters>
		</Method>
	</ObjectPaths>
</Request>

Remarks

Note

Info admonition: To use this command you must be a Global or SharePoint administrator.

Warning

If a site remains archived for more than seven days, the reactivation fee will be calculated based on the entire storage capacity of the site.

Additional info

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions