Skip to content

Latest commit

 

History

History
150 lines (108 loc) · 4.05 KB

File metadata and controls

150 lines (108 loc) · 4.05 KB
external help file Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name microsoft.online.sharepoint.powershell
online version https://learn.microsoft.com/powershell/module/microsoft.online.sharepoint.powershell/new-spotenantapplyfileversionpolicyjob
applicable SharePoint Online
title New-SPOTenantApplyFileVersionPolicyJob
schema 2.0.0
author msjennywu
ms.author jennywu
ms.reviewer
manager seanmc

New-SPOTenantApplyFileVersionPolicyJob

SYNOPSIS

Note

This feature is part of the version history controls preview. If your tenant is not part of the preview or the feature has not rolled out to your tenant, you will get an error when trying to run this cmdlet.

Queues a job to apply the tenant-level file version policy across all sites. SharePoint Advanced Management (SAM) license is required to run this cmdlet.

SYNTAX

New-SPOTenantApplyFileVersionPolicyJob [-TrimVersions] [-SetVersionPolicy] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

Queues a job to apply the tenant-level file version policy across all sites. The job trims existing file versions and/or set version policy for existing document libraries based on the version policy configured at the tenant level.

The following site types are excluded from processing:

  • Read-only sites

  • Locked sites

  • Archived sites

  • Sites with version policy broken inheritance

Caution:

  • Versions deleted using this cmdlet will be permanently deleted and cannot be recovered from the recycle bin.
  • If the tenant-level version policy is modified while the job is in progress, the job will apply the updated policy to the remaining sites that have not yet been processed. Sites that were already processed will not be re-evaluated or updated.

EXAMPLES

Example 1

New-SPOTenantApplyFileVersionPolicyJob -TrimVersions -SetVersionPolicy

Example 1 starts a tenant apply file version policy job to trim versions and set version policy for existing document libraries across all sites.

Example 2

New-SPOTenantApplyFileVersionPolicyJob -TrimVersions

Example 2 starts a tenant apply file version policy job to trim versions for files in doducment libraries across all sites.

Example 3

New-SPOTenantApplyFileVersionPolicyJob -SetVersionPolicy

Example 3 starts a tenant apply file version policy job to set version policy for existing document libraries across all sites.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SetVersionPolicy

Set version policy for existing document libraries across all sites.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrimVersions

Trim versions for files in document libraries across all sites.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS

Get-SPOTenantApplyFileVersionPolicyJobProgress

Remove-SPOTenantApplyFileVersionPolicyJob