diff --git a/.openpublishing.redirection.ms-ol-sp-ps.json b/.openpublishing.redirection.ms-ol-sp-ps.json index 23712c62e..7516bdbc0 100644 --- a/.openpublishing.redirection.ms-ol-sp-ps.json +++ b/.openpublishing.redirection.ms-ol-sp-ps.json @@ -505,6 +505,11 @@ "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/get-spositegroup", "redirect_document_id": true }, + { + "source_path": "sharepoint/sharepoint-ps/sharepoint-online/Get-SPOSiteManageVersionPolicyJobProgress.md", + "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/get-spositemanageversionpolicyjobprogress", + "redirect_document_id": true + }, { "source_path": "sharepoint/sharepoint-ps/sharepoint-online/Get-SPOSitePages.md", "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/get-spositepages", @@ -770,6 +775,11 @@ "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/new-spositesharingreportjob", "redirect_document_id": true }, + { + "source_path": "sharepoint/sharepoint-ps/sharepoint-online/New-SPOSiteManageVersionPolicyJob.md", + "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/new-spositemanageversionpolicyjob", + "redirect_document_id": true + }, { "source_path": "sharepoint/sharepoint-ps/sharepoint-online/Register-SPODataEncryptionPolicy.md", "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/register-spodataencryptionpolicy", @@ -930,6 +940,11 @@ "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/remove-spositegroup", "redirect_document_id": true }, + { + "source_path": "sharepoint/sharepoint-ps/sharepoint-online/Remove-SPOSiteManageVersionPolicyJob.md", + "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/remove-spositemanageversionpolicyjob", + "redirect_document_id": true + }, { "source_path": "sharepoint/sharepoint-ps/sharepoint-online/Remove-SPOSiteScript.md", "redirect_url": "/powershell/module/microsoft.online.sharepoint.powershell/remove-spositescript", diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOSiteManageVersionPolicyJobProgress.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOSiteManageVersionPolicyJobProgress.md new file mode 100644 index 000000000..f588d0bc0 --- /dev/null +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOSiteManageVersionPolicyJobProgress.md @@ -0,0 +1,75 @@ +--- +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml +Module Name: Microsoft.Online.SharePoint.PowerShell +online version: https://learn.microsoft.com/powershell/module/sharepoint-online/get-spositemanageversionpolicyjobprogress +applicable: SharePoint Online +title: Get-SPOSiteManageVersionPolicyJobProgress +schema: 2.0.0 +author: blarrywangmsft +ms.author: blarrywang +ms.reviewer: +--- + +# Get-SPOSiteManageVersionPolicyJobProgress + +## SYNOPSIS +Gets the status and progress for a background job started by `New-SPOSiteManageVersionPolicyJob`. +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +## SYNTAX + +``` +Get-SPOSiteManageVersionPolicyJobProgress [-Identity] [] +``` + +## DESCRIPTION +Gets the status and progress for a background job started by `New-SPOSiteManageVersionPolicyJob`. + +## EXAMPLES + +### Example 1 + +``` +Get-SPOSiteManageVersionPolicyJobProgress https://contoso.sharepoint.com/sites/site1 +``` + +Gets the progress of the site manage version policy job for the given site. + +## PARAMETERS + +### -Identity + +> Applicable: SharePoint Online + +Specifies the URL of the site collection. + +```yaml +Type: SpoSitePipeBind +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS + +[New-SPOSiteManageVersionPolicyJob](New-SPOSiteManageVersionPolicyJob.md) + +[Remove-SPOSiteManageVersionPolicyJob](Remove-SPOSiteManageVersionPolicyJob.md) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md index ad4d75029..f5bbd67c7 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md @@ -315,6 +315,9 @@ Gets the status for a file version expiration report generation job for a site c ### [Get-SPOSiteGroup](Get-SPOSiteGroup.md) Gets all the groups on the specified site collection. +### [Get-SPOSiteManageVersionPolicyJobProgress](Get-SPOSiteManageVersionPolicyJobProgress.md) +Gets the status and progress for site manage version policy jobs. + ### [Get-SPOSitePages](Get-SPOSitePages.md) This cmdlet allows you to retrieve all SharePoint pages under a specific SharePoint site. @@ -465,6 +468,9 @@ Generates a version storage usage report for a site collection. This report can ### [New-SPOSiteGroup](New-SPOSiteGroup.md) Creates a new group in a SharePoint Online site collection. +### [New-SPOSiteManageVersionPolicyJob](New-SPOSiteManageVersionPolicyJob.md) +Starts a background job to manage file versions and version history limits for all document libraries in the given site. + ### [New-SPOSiteSharingReportJob](New-SPOSiteSharingReportJob.md) Creates a new sharing report job. @@ -567,6 +573,9 @@ Stops further processing of site level trim job that is in-progress. ### [Remove-SPOSiteGroup](Remove-SPOSiteGroup.md) Removes a SharePoint Online group from a site collection. +### [Remove-SPOSiteManageVersionPolicyJob](Remove-SPOSiteManageVersionPolicyJob.md) +Stops processing of the in-progress manage version policy job for the given site. + ### [Remove-SPOSiteScript](Remove-SPOSiteScript.md) Removes a site script. diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOListFileVersionBatchDeleteJob.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOListFileVersionBatchDeleteJob.md index aa2629acb..c62059c6a 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOListFileVersionBatchDeleteJob.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOListFileVersionBatchDeleteJob.md @@ -37,6 +37,12 @@ New-SPOListFileVersionBatchDeleteJob [-Site] -List -MajorWithMinorVersionsLimit [-WhatIf] [-Confirm] [] ``` +### ByPolicy +``` +New-SPOListFileVersionBatchDeleteJob [-Site] -List [-FileTypes ] + [-ExcludeDefaultPolicy] [-TrimUseListPolicy] [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION Queues a job to trim versions from a document library. @@ -69,6 +75,30 @@ New-SPOListFileVersionBatchDeleteJob -Site https://contoso.sharepoint.com/sites/ Example 3 starts a trim job that will delete file versions in the document library called "Documents" based on the version count limits. +### EXAMPLE 4 + +```powershell +New-SPOListFileVersionBatchDeleteJob -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -TrimUseListPolicy +``` + +Example 4 starts a trim job that will delete file versions in the document library called "Documents" based on the version history limits of the document library. + +### EXAMPLE 5 + +```powershell +New-SPOListFileVersionBatchDeleteJob -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -TrimUseListPolicy -FileTypes @("Video", "Audio") +``` + +Example 5 starts a trim job that will delete file versions for video and audio file types, and file versions that do not belong to a file type override in the document library based on the version history limits of the document library. + +### EXAMPLE 6 + +```powershell +New-SPOListFileVersionBatchDeleteJob -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -TrimUseListPolicy -FileTypes @("Video", "Audio") -ExcludeDefaultPolicy +``` + +Example 6 starts a trim job that will delete file versions for video and audio file types in the document library based on the version history limits of the document library. + ## PARAMETERS ### -Automatic @@ -101,6 +131,45 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ExcludeDefaultPolicy +Indicates whether to trim versions based on the default version history limits. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: SwitchParameter +Parameter Sets: ByPolicy +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileTypes +An array of file type names to trim versions. The supported file type names are: +- Audio +- OutlookPST +- Video + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: String[] +Parameter Sets: ByPolicy +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -List The document library name or Id. @@ -180,6 +249,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TrimUseListPolicy +Indicates whether to trim versions by applying the document library's version history limits. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: SwitchParameter +Parameter Sets: ByPolicy +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. diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md new file mode 100644 index 000000000..249236cf2 --- /dev/null +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md @@ -0,0 +1,242 @@ +--- +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml +Module Name: Microsoft.Online.SharePoint.PowerShell +online version: https://learn.microsoft.com/powershell/module/sharepoint-online/new-spositemanageversionpolicyjob +applicable: SharePoint Online +title: New-SPOSiteManageVersionPolicyJob +schema: 2.0.0 +author: blarrywangmsft +ms.author: blarrywang +ms.reviewer: +--- + +# New-SPOSiteManageVersionPolicyJob + +## SYNOPSIS +Starts a background job to manage file versions and version history limits for all document libraries in the given site. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +## SYNTAX + +### MandatoryTrimOptionalSync +```powershell +New-SPOSiteManageVersionPolicyJob [-Identity] [-FileTypes ] [-ExcludeDefaultPolicy] + [-TrimUseListPolicy] [-SyncListPolicy] [-WhatIf] [-Confirm] [] +``` + +### MandatorySync +``` +New-SPOSiteManageVersionPolicyJob [-Identity] [-FileTypes ] [-ExcludeDefaultPolicy] + [-SyncListPolicy] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Starts a background job that does one or more of the following: +- sets the version history limits of all document libraries to that of the site; +- trims version in all document libraries according to each list's version history limits. + +This effect can be applied to default version history limits, or a set of file types. Supported file types are: +- Audio +- OutlookPST +- Video + +## EXAMPLES + +### Example 1 + +```powershell +New-SPOSiteManageVersionPolicyJob -Identity https://contoso.sharepoint.com/sites/site1 -SyncListPolicy -FileTypes @("Video","Audio") +``` + +Apply the site video, audio, and default version history limits to existing document libraries. If the site is not broken inheritance for version history limits, then it applies the tenant version history limits. + +### Example 2 + +```powershell +New-SPOSiteManageVersionPolicyJob -Identity https://contoso.sharepoint.com/sites/site1 -SyncListPolicy -FileTypes @("Video","Audio") -ExcludeDefaultPolicy +``` + +Apply the site video, audio version history limits to existing document libraries. If the site is not broken inheritance for version history limits, then it applies the tenant version history limits. + +### Example 3 + +```powershell +New-SPOSiteManageVersionPolicyJob -Identity https://contoso.sharepoint.com/sites/site1 -SyncListPolicy +``` + +Apply the site version history limits (including file type overrides) to existing document libraries. If the site is not broken inheritance for version history limits, then it applies the tenant version history limits. + +### Example 4 + +```powershell +New-SPOSiteManageVersionPolicyJob -Identity https://contoso.sharepoint.com/sites/site1 -TrimUseListPolicy -FileTypes @("Video","Audio") +``` + +Trim video and audio file versions, and the file versions that don't have a file type override, based on each document library's version history limits. + +### Example 5 + +```powershell +New-SPOSiteManageVersionPolicyJob -Identity https://contoso.sharepoint.com/sites/site1 -TrimUseListPolicy -FileTypes @("Video","Audio") -ExcludeDefaultPolicy +``` + +Trim video and audio file versions based on each document library's version history limits. + +### Example 6 + +```powershell +New-SPOSiteManageVersionPolicyJob -Identity https://contoso.sharepoint.com/sites/site1 -TrimUseListPolicy +``` + +Trim all file versions based on each document library's version history limits. + +### Example 7 + +```powershell +New-SPOSiteManageVersionPolicyJob -Identity https://contoso.sharepoint.com/sites/site1 -SyncListPolicy -TrimUseListPolicy +``` + +Apply the site version history limits (including file type overrides) to existing document libraries. If the site is not broken inheritance for version history limits, then it applies the tenant version history limits. Then trim all file versions based on each document library's version history limits. + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExcludeDefaultPolicy +Indicates whether to update the default version history limits and/or to trim file versions that don't have an override. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileTypes +An array of file type names. The supported file type names are: +- Audio +- OutlookPST +- Video + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Identity +> Applicable: SharePoint Online + +Specifies the URL of the site collection. + +```yaml +Type: SpoSitePipeBind +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SyncListPolicy +Indicates whether to update all of the document libraries' version history limits to that of the site. Or if the site is not broken inheritance for version history limits, then it applies the tenant version history limits. + +```yaml +Type: SwitchParameter +Parameter Sets: MandatoryTrimOptionalSync +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: SwitchParameter +Parameter Sets: MandatorySync +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TrimUseListPolicy +Indicates whether to trim existing versions. + +```yaml +Type: SwitchParameter +Parameter Sets: MandatoryTrimOptionalSync +Aliases: + +Required: True +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. + +```yaml +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS +[Get-SPOSiteManageVersionPolicyJobProgress](Get-SPOSiteManageVersionPolicyJobProgress.md) +[Remove-SPOSiteManageVersionPolicyJob](Remove-SPOSiteManageVersionPolicyJob.md) \ No newline at end of file diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOSiteManageVersionPolicyJob.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOSiteManageVersionPolicyJob.md new file mode 100644 index 000000000..09dfd8a94 --- /dev/null +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOSiteManageVersionPolicyJob.md @@ -0,0 +1,104 @@ +--- +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml +Module Name: Microsoft.Online.SharePoint.PowerShell +online version: https://learn.microsoft.com/powershell/module/sharepoint-online/remove-spositemanageversionpolicyjob +applicable: SharePoint Online +title: Remove-SPOSiteManageVersionPolicyJob +schema: 2.0.0 +author: blarrywangmsft +ms.author: blarrywang +ms.reviewer: +--- + +# Remove-SPOSiteManageVersionPolicyJob + +## SYNOPSIS +Stops processing of the in-progress manage version policy job for the given site. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +## SYNTAX + +```powershell +Remove-SPOSiteManageVersionPolicyJob [-Identity] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Stops processing of the in-progress manage version policy job for the given site. + +## EXAMPLES + +### Example 1 + +```powershell +Remove-SPOSiteFileVersionBatchDeleteJob -Identity https://contoso.sharepoint.com/sites/site1 +``` + +Stops further processing of site manage version policy job. + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Identity +> Applicable: SharePoint Online + +Specifies the URL of the site collection. + +```yaml +Type: SpoSitePipeBind +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS +[Get-SPOSiteManageVersionPolicyJobProgress](Get-SPOSiteManageVersionPolicyJobProgress.md) +[New-SPOSiteManageVersionPolicyJob](New-SPOSiteManageVersionPolicyJob.md) \ No newline at end of file diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOListVersionPolicy.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOListVersionPolicy.md index 095fa9c5b..f232c0959 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOListVersionPolicy.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOListVersionPolicy.md @@ -19,10 +19,23 @@ Sets the version policy setting on the document library. ## SYNTAX +### SetPolicy ``` Set-SPOListVersionPolicy [-Site] -List -EnableAutoExpirationVersionTrim [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] - [-MajorWithMinorVersionsLimit ] [] + [-MajorWithMinorVersionsLimit ] [-FileTypes ] [] +``` + +### RemovePolicy +``` +Set-SPOListVersionPolicy [-Site] -List + -RemoveVersionExpirationFileTypeOverride [] +``` + +### SyncPolicy +``` +Set-SPOListVersionPolicy [-Site] -List [-FileTypes ] [-Sync] + [-ExcludeDefaultPolicy] [] ``` ## DESCRIPTION @@ -51,13 +64,52 @@ Example 2 sets manual version histroy limits on the document library called "Doc Set-SPOListVersionPolicy -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -MajorWithMinorVersionsLimit 20 -ExpireVersionsAfterDays 0 ``` -Example 3 sets manual version histroy limits on the document library called "Documents" by limiting the number of versions with no time limits. The new document libraries will use this version setting. +Example 3 sets manual version histroy limits on the document library called "Documents" by limiting the number of versions with no time limits. + +### Example 4 +```powershell +Set-SPOListVersionPolicy -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -EnableAutoExpirationVersionTrim $true -FileTypes @("Video", "Audio") +``` +Example 4 sets automatic version history limit override for video and audio file types on the document library called "Documents". + +### EXAMPLE 5 + +```powershell +Set-SPOListVersionPolicy -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -Sync +``` + +Example 5 sets the version history limits (include file type overrides) to that of the tenant or site (if the site this document library is in has broken inheritance for version history limits). + +### EXAMPLE 6 + +```powershell +Set-SPOListVersionPolicy -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -Sync -FileTypes @("Video", "Audio") +``` + +Example 6 sets the default version history limits and overrides for video and audio file types to that of the tenant or site (if the site this document library is in has broken inheritance for version history limits). + +### EXAMPLE 7 + +```powershell +Set-SPOListVersionPolicy -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -Sync -FileTypes @("Video", "Audio") -ExcludeDefaultPolicy +``` + +Example 7 sets the only the version history limit overrides for video and audio file types to that of the tenant or site (if the site this document library is in has broken inheritance for version history limits). + +### EXAMPLE 8 + +```powershell +Set-SPOListVersionPolicy -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -RemoveVersionExpirationFileTypeOverride @("Video", "Audio") +``` + +Example 8 removes the version history limit overrides for video and audio file types so that they follow the default version history limits. ## PARAMETERS ### -EnableAutoExpirationVersionTrim > Applicable: SharePoint Online + Global and SharePoint Administrators can set document library level version history limits settings that universally apply to new versions created. When version history limits are managed automatically, SharePoint employs an algorithm behind the scenes that deletes (thins out) intermittent older versions that are least likely to be needed, while preserving sufficient high-value versions - more versions in the recent past and fewer farther back in time - in case restores are required. @@ -77,8 +129,8 @@ The valid values are: PARAMVALUE: $true | $false ```yaml -Type: System.Boolean -Parameter Sets: (All) +Type: Boolean +Parameter Sets: SetPolicy Aliases: Required: True @@ -88,16 +140,67 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ExcludeDefaultPolicy +> Applicable: SharePoint Online + +Indicates whether to synchronize the default version policy to the default policy of the tenant or the site (if the site this document library is in has broken inheritance for version history limits). + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: SwitchParameter +Parameter Sets: SyncPolicy +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ExpireVersionsAfterDays > Applicable: SharePoint Online + When version history limits are managed manually (`EnableAutoExpirationVersionTrim $false`), admins will need to set the limits to the number of major versions (`MajorVersionLimit`), the number of major with minor versions (`MajorWithMinorVersionsLimit`) and the time period the versions are stored (`ExpireVersionsAfterDays`). Please check the description of `EnableAutoExpirationVersionTrim` for more details. PARAMVALUE: Int32 ```yaml -Type: System.Int32 -Parameter Sets: (All) +Type: Int32 +Parameter Sets: SetPolicy +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileTypes +> Applicable: SharePoint Online + +An array of file type names. The supported file type names are: +- Audio +- OutlookPST +- Video + +Apply the version history limits to a set of file types so that they no longer follow the default version history limits. It is used in combination with the following parameters: +- [EnableAutoExpirationVersionTrim](#-enableautoexpirationversiontrim) +- [MajorVersionLimit](#-majorversionlimit) +- [ExpireVersionsAfterDays](#-expireversionsafterdays) + +Or apply the version history limit override for the file types of the tenant or the site (if the site this document library is in has broken inheritance for version history limits) by using the [Sync](#-sync) parameter. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: String[] +Parameter Sets: SetPolicy, SyncPolicy Aliases: Required: False @@ -126,13 +229,14 @@ Accept wildcard characters: False ### -MajorVersionLimit > Applicable: SharePoint Online + When version history limits are managed manually (`EnableAutoExpirationVersionTrim $false`), admins will need to set the limits to the number of major versions (`MajorVersionLimit`) and the time period the versions are stored (`ExpireVersionsAfterDays`). Please check the description of `EnableAutoExpirationVersionTrim` for more details. PARAMVALUE: Int32 ```yaml -Type: System.Int32 -Parameter Sets: (All) +Type: Int32 +Parameter Sets: SetPolicy Aliases: Required: False @@ -145,13 +249,14 @@ Accept wildcard characters: False ### -MajorWithMinorVersionsLimit > Applicable: SharePoint Online + When version history limits are managed manually (`EnableAutoExpirationVersionTrim $false`), admins will need to set the limits to the number of major versions (`MajorVersionLimit`), the number of major with minor versions (`MajorWithMinorVersionsLimit`) and the time period the versions are stored (`ExpireVersionsAfterDays`). Please check the description of `EnableAutoExpirationVersionTrim` for more details. PARAMVALUE: Int32 ```yaml -Type: System.Int32 -Parameter Sets: (All) +Type: Int32 +Parameter Sets: SetPolicy Aliases: Required: False @@ -161,6 +266,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -RemoveVersionExpirationFileTypeOverride +An array of file type names. Removes the version history limit override from a set of file types so that they will follow the default version history limits. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: String[] +Parameter Sets: RemovePolicy +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Site > Applicable: SharePoint Online @@ -179,6 +302,31 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -Sync +Apply the version history limits of the tenant or the site (if the site this document library is in has broken inheritance for version history limits). + +You may use the following parameters in combination to update only the default policy or a set of file type overrides: +- [ExcludeDefaultPolicy](#-excludedefaultpolicy): if set, it will not update the default policy. +- [FileTypes](#-filetypes): + - if set, it will update the specified file types; + - if not set, it will update all file type overrides; + - if set to an empty array (i.e. `@()`), it will not update any file type overrides. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: SwitchParameter +Parameter Sets: SyncPolicy +Aliases: + +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](https://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md index adb26af2a..bd0c0e14d 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md @@ -147,6 +147,19 @@ Set-SPOSite [-Identity] [-InformationBarriersMode ] [-WhatIf] [-Confirm] [] ``` +### SetSiteFileTypeFileVersionPolicy + +``` +Set-SPOSite [-Identity] [-InformationBarriersMode ] [-EnableAutoExpirationVersionTrim ] [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] -FileTypesForVersionExpiration [-ApplyToNewDocumentLibraries] [-WhatIf] [-Confirm] [] +``` + +### RemoveSiteFileVersionPolicy + +``` +Set-SPOSite [-Identity] [-InformationBarriersMode ] [-ApplyToNewDocumentLibraries] + -RemoveVersionExpirationFileTypeOverride [-WhatIf] [-Confirm] [] +``` + ### ClearGroupId ``` @@ -258,7 +271,7 @@ In this example, an authentication context called MFA is attached to the site. Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $true ``` -Example 11 sets automatic version history limits at site level. Automatic setting will be applied to all new document libraries created in the site and a background request will be created to asynchronously process the update on existing document libraries that have versioning enabled. +Example 11 sets automatic version history limits at the site level. Automatic setting will be applied to all new document libraries created in the site and a background request will be created to asynchronously process the update on existing document libraries that have versioning enabled. ### EXAMPLE 12 @@ -266,7 +279,7 @@ Example 11 sets automatic version history limits at site level. Automatic settin Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -MajorWithMinorVersionsLimit 20 -ExpireVersionsAfterDays 30 ``` -Example 12 sets manual version history limits at site level by limiting the number of versions and the time (in days) versions are kept. The new document libraries will use this version setting. Also it creates a job to set this manual version setting for existing document libraries that enabled versioning. +Example 12 sets manual version history limits at the site level by limiting the number of versions and the time (in days) versions are kept. The new document libraries will use this version setting. Also it creates a job to set this manual version setting for existing document libraries that enabled versioning. ### EXAMPLE 13 @@ -274,7 +287,7 @@ Example 12 sets manual version history limits at site level by limiting the numb Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -MajorWithMinorVersionsLimit 20 -ExpireVersionsAfterDays 0 ``` -Example 13 sets manual version history limits at site level by limiting the number of versions with no time limits. The new document libraries will use this version setting. Also it creates a job to set this manual version setting for existing document libraries that enabled versioning. +Example 13 sets manual version history limits at the site level by limiting the number of versions with no time limits. The new document libraries will use this version setting. Also it creates a job to set this manual version setting for existing document libraries that enabled versioning. ### Example 14 @@ -282,7 +295,7 @@ Example 13 sets manual version history limits at site level by limiting the numb Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $true -ApplyToNewDocumentLibraries ``` -Example 14 sets automatic version history limits at site level. The new document libraries will use this version setting. +Example 14 sets automatic version history limits at the site level. The new document libraries will use this version setting. ### EXAMPLE 15 @@ -290,7 +303,7 @@ Example 14 sets automatic version history limits at site level. The new document Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 30 -ApplyToNewDocumentLibraries ``` -Example 15 sets manual version history limits at site level by limiting the number of versions and the time (in days) versions are kept. The new document libraries will use this version setting. +Example 15 sets manual version history limits at the site level by limiting the number of versions and the time (in days) versions are kept. The new document libraries will use this version setting. ### EXAMPLE 16 @@ -298,7 +311,7 @@ Example 15 sets manual version history limits at site level by limiting the numb Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 0 -ApplyToNewDocumentLibraries ``` -Example 16 sets manual version history limits at site level by limiting the number of versions with no time limits. The new document libraries will use this version setting. +Example 16 sets manual version history limits at the site level by limiting the number of versions with no time limits. The new document libraries will use this version setting. ### Example 17 @@ -330,7 +343,45 @@ Example 19 creates a request to set manual version history limits that limits th Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -InheritVersionPolicyFromTenant ``` -Example 20 clears the file version setting at site level. The new document libraries will use the Tenant Level setting. It won't impact the existing document libraries. +Example 20 clears the file version setting at the site level. The new document libraries will use the Tenant Level setting. It won't impact the existing document libraries. + +### Example 21 + + +```powershell +Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $true -FileTypesForVersionExpiration @("Video", "Audio") -ApplyToNewDocumentLibraries +``` + +Example 21 sets automatic version history limit override for video and audio file types at the site level. The new document libraries will use this version setting. + +### Example 22 + + +```powershell +Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 30 +-FileTypesForVersionExpiration @("Video", "Audio") -ApplyToNewDocumentLibraries +``` + +Example 22 sets manual version history limit override for video and audio file types at the site level by limiting the number of versions and the time (in days) versions are kept. The new document libraries will use this version setting. + +### Example 23 + + +```powershell +Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 0 +-FileTypesForVersionExpiration @("Video", "Audio") -ApplyToNewDocumentLibraries +``` + +Example 23 sets manual version history limit override for video and audio file types at the site level by limiting the number of versions with no time limits. The new document libraries will use this version setting. + +### Example 24 + + +```powershell +Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -RemoveVersionExpirationFileTypeOverride @("Video", "Audio") -ApplyToNewDocumentLibraries +``` + +Example 24 removes the version history limit override for video and audio file types at the site level. The new document libraries will use this version setting. ## PARAMETERS @@ -518,7 +569,7 @@ Apply the version history limits setting to new document libraries. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: SetSiteFileVersionPolicy +Parameter Sets: SetSiteFileVersionPolicy, RemoveSiteFileVersionPolicy Aliases: Required: False @@ -528,6 +579,18 @@ Accept pipeline input: False Accept wildcard characters: False ``` +```yaml +Type: SwitchParameter +Parameter Sets: SetSiteFileTypeFileVersionPolicy +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AuthenticationContextAccessType > Applicable: SharePoint Online @@ -1045,7 +1108,7 @@ PARAMVALUE: False | True ```yaml Type: System.Boolean -Parameter Sets: SetSiteFileVersionPolicy +Parameter Sets: SetSiteFileVersionPolicy, SetSiteFileTypeFileVersionPolicy Aliases: Required: False @@ -1140,7 +1203,7 @@ PARAMVALUE: Int32 ```yaml Type: System.Int32 -Parameter Sets: SetSiteFileVersionPolicy +Parameter Sets: SetSiteFileVersionPolicy, SetSiteFileTypeFileVersionPolicy Aliases: Required: False @@ -1170,6 +1233,37 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -FileTypesForVersionExpiration + +> Applicable: SharePoint Online + +An array of file type names. The supported file type names are: +- Audio +- OutlookPST +- Video + +Apply the version history limits to a set of file types so that they no longer follow the default version history limits. It is used in combination with the following parameters: +- [EnableAutoExpirationVersionTrim](#-enableautoexpirationversiontrim) +- [MajorVersionLimit](#-majorversionlimit) +- [ExpireVersionsAfterDays](#-expireversionsafterdays) + +This must be used with [ApplyToNewDocumentLibraries](#-applytonewdocumentlibraries) switch set to true, because the version history limits are only applied on new document libraries in the site. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: String[] +Parameter Sets: SetSiteFileTypeFileVersionPolicy +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -HidePeoplePreviewingFiles > Applicable: SharePoint Online @@ -1272,7 +1366,7 @@ Accept wildcard characters: False > Applicable: SharePoint Online -Clear the file version setting at site level. The new document libraries will use the Tenant Level setting. It won't impact the existing document libraries. +Clear the file version setting at the site level. The new document libraries will use the Tenant Level setting. It won't impact the existing document libraries. ```yaml Type: System.Management.Automation.SwitchParameter @@ -1430,7 +1524,7 @@ PARAMVALUE: Int32 ```yaml Type: System.Int32 -Parameter Sets: SetSiteFileVersionPolicy +Parameter Sets: SetSiteFileVersionPolicy, SetSiteFileTypeFileVersionPolicy Aliases: Required: False @@ -1701,6 +1795,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -RemoveVersionExpirationFileTypeOverride + +> Applicable: SharePoint Online + +An array of file type names. Removes the version history limits to a set of file types so that they will follow the default version history limits. + +This must be used with [ApplyToNewDocumentLibraries](#-applytonewdocumentlibraries) switch set to true, because the version history limits are only applied on new document libraries in the site. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: String[] +Parameter Sets: RemoveSiteFileVersionPolicy +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RequestFilesLinkEnabled > Applicable: SharePoint Online diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md index 582c748aa..0ded90bcd 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md @@ -105,7 +105,9 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-IsEnableAppAuthPopUpEnabled ] [-IsDataAccessInCardDesignerEnabled ] [-MassDeleteNotificationDisabled ] [-EnableAutoExpirationVersionTrim ] [-EnableMediaReactions ] [-BusinessConnectivityServiceDisabled ] - [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] [-AllowSensitivityLabelOnRecords ] + [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] [-FileTypesForVersionExpiration ] + [-RemoveVersionExpirationFileTypeOverride ] + [-AllowSensitivityLabelOnRecords ] [-DelayDenyAddAndCustomizePagesEnforcement ] [-DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites ] [-AllowClassicPublishingSiteCreation ] [-WhoCanShareAnonymousAllowList ] @@ -337,7 +339,9 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-IsEnableAppAuthPopUpEnabled ] [-IsDataAccessInCardDesignerEnabled ] [-MassDeleteNotificationDisabled ] [-EnableAutoExpirationVersionTrim ] [-EnableMediaReactions ] [-BusinessConnectivityServiceDisabled ] - [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] [-AllowSensitivityLabelOnRecords ] + [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] + [-FileTypesForVersionExpiration ] [-RemoveVersionExpirationFileTypeOverride ] + [-AllowSensitivityLabelOnRecords ] [-DelayDenyAddAndCustomizePagesEnforcement ] [-DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites ] [-AllowClassicPublishingSiteCreation ] [-WhoCanShareAnonymousAllowList ] @@ -452,7 +456,9 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-IsEnableAppAuthPopUpEnabled ] [-IsDataAccessInCardDesignerEnabled ] [-MassDeleteNotificationDisabled ] [-EnableAutoExpirationVersionTrim ] [-EnableMediaReactions ] [-BusinessConnectivityServiceDisabled ] - [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] [-AllowSensitivityLabelOnRecords ] + [-ExpireVersionsAfterDays ] [-MajorVersionLimit ] + [-FileTypesForVersionExpiration ] [-RemoveVersionExpirationFileTypeOverride ] + [-AllowSensitivityLabelOnRecords ] [-DelayDenyAddAndCustomizePagesEnforcement ] [-DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites ] [-AllowClassicPublishingSiteCreation ] [-WhoCanShareAnonymousAllowList ] @@ -664,6 +670,38 @@ Set-SPOTenant -DisabledAdaptiveCardExtensionIds 0d2d0fd0-9489-47ef-acfb-90edca00 This example disables the Power Apps Adaptive Card Extension. +### EXAMPLE 22 + +```powershell +Set-SPOTenant -EnableAutoExpirationVersionTrim $true -FileTypesForVersionExpiration @("Video", "Audio") +``` + +This example sets automatic version history limit override for video and audio file types on all new document libraries at tenant level. + +### EXAMPLE 23 + +```powershell +Set-SPOTenant -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 30 -FileTypesForVersionExpiration @("Video", "Audio") +``` + +This example sets manual version history limit override for video and audio file types on all new document libraries at tenant level by limiting the number of major versions and the time (in days) versions are kept. + +### EXAMPLE 24 + +```powershell +Set-SPOTenant -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 0 -FileTypesForVersionExpiration @("Video", "Audio") +``` + +This example sets manual version history limit override for video and audio file types on all new document libraries at tenant level by limiting the number of major versions with no time limits. + +### EXAMPLE 25 + +```powershell +Set-SPOTenant -RemoveVersionExpirationFileTypeOverride @("Video", "Audio") +``` + +This example removes any specific version history limit override set for video and audio file types on all new document libraries at tenant level. + ## PARAMETERS ### -AIBuilderModelScope @@ -3125,6 +3163,35 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -FileTypesForVersionExpiration + +An array of file type names. The supported file type names are: +- Audio +- OutlookPST +- Video + +Apply the version history limits to a set of file types so that they no longer follow the default version history limits. It is used in combination with the following parameters: +- [EnableAutoExpirationVersionTrim](#-enableautoexpirationversiontrim) +- [MajorVersionLimit](#-majorversionlimit) +- [ExpireVersionsAfterDays](#-expireversionsafterdays) + +The version history limits are applied on new document libraries in the tenant. + +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -FolderAnonymousLinkType > Applicable: SharePoint Online @@ -4434,6 +4501,26 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -RemoveVersionExpirationFileTypeOverride + +An array of file type names. Removes the version history limit override from a set of file types so that they will follow the default version history limits. + +The version history limits are applied on new document libraries in the tenant. +> [!NOTE] +> This feature is currently in preview and may not be available in your tenant. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RequireAcceptingAccountMatchInvitedAccount This parameter has been deprecated since SharePoint Online legacy invitation flow switched to Entra B2B invitation flow.