Skip to main content

spo site versionpolicy get

Retrieves the version policy settings of a specific site.

Usage

m365 spo site versionpolicy get [options]

Options

-u, --siteUrl <siteUrl>

URL of the site.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, permissions, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Permissions

ResourcePermissions
SharePointAllSites.Read

Examples

Retrieve the version policy settings of a specific site.

m365 spo site versionpolicy get --siteUrl "https://contoso.sharepoint.com/sites/Marketing"

Response

{
"defaultTrimMode": "automatic",
"defaultExpireAfterDays": 30,
"majorVersionLimit": 500
}