Updates from: 05/10/2024 03:53:46
Service Microsoft Docs article Related commit history on GitHub Change details
SharePoint Document Library Version History Limits https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/document-library-version-history-limits.md
Automatic setting is recommended for optimized version storage. It combines the
### Manual setting
-The manual setting allows admins to set count limits on the number of major versions or to set expiration and count limits. When this option is selected, the admins can configure it in the following ways. For more information, see [setting the right limits for your organization](plan-version-storage.md#determine-right-count-or-expiration-version-limits).
+The manual setting allows admins to set count limits on the number of major versions or to set expiration and count limits. When this option is selected, the admins can configure it in the following ways.
- **Major version limit with expiration period**: Versions are deleted after exceeding either the set number of major versions or after the set period of time. For example, if you configure a library to store 500 major versions with a 365-day expiration, the system stores no more than 500 versions, and automatically deletes any version older than 365 days. - **Major version limits with no expiration period**: Versions are deleted after they exceed the set number of major versions. For example, if a library is configured to store 500 major versions, no more than 500 versions is stored for each file or item.
+For more information, see [determining the right count or expiration version limits](plan-version-storage.md#determine-right-count-or-expiration-version-limits).
> [!NOTE] > - The UI doesn't allow a value less than 100 major versions or less than 30 days expiration time limits to be set, but it's possible to set the system to store fewer versions using public APIs. For reliability, any value less than 100 versions or less than 30 days expiration time limit isn't recommended and can result in the user activity causing an inadvertent data loss.
SharePoint Library Version Limits https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/library-version-limits.md
Follow these steps to manage version history limits for a site by using PowerShe
| | | | View version history limits set on a library | `Get-SPOListVersionPolicy -Site $siteUrl -List $libName` | | Set Automatic version history limits on a library | `Set-SPOListVersionPolicy -Site $siteUrl -List $libName -EnableAutoExpirationVersionTrim $true` |
-| Set Manual limits with count and time parameters on a library | `Set-SPOListVersionPolicy -Site $siteUrl -List $libName`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`|
-| Set Manual limits with count with no expiration limit on a library | `Set-SPOListVersionPolicy -Site $siteUrl -List $libName`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0` |
+| Set Manual limits with count and time parameters on a library | `Set-SPOListVersionPolicy -Site $siteUrl -List $libName`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`|
+| Set Manual limits with count with no expiration limit on a library | `Set-SPOListVersionPolicy -Site $siteUrl -List $libName`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0` |
## Learn More For more information, check out the following resources: -- Manage version history limits for a library using Set-SPOListVersionPolicy
+- Manage version history limits for a library using [Set-SPOListVersionPolicy](/powershell/module/sharepoint-online/set-spolistversionpolicy)
SharePoint Manage Teams Sharepoint Experiences https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/manage-teams-sharepoint-experiences.md
Previously updated : 12/20/2021 Last updated : 05/07/2024 Title: Manage settings and permissions when SharePoint and Teams are integrated
SharePoint Site Version Limits https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/site-version-limits.md
Version history limits for an individual site can be managed in the following wa
| Version history limits option | Description | |:--|:--|
-|**Apply site-level version history limits to all new and existing document libraries in a Site:** |To achieve a consistent version storage policy for a site, you can choose to **set a limit to universally apply to all libraries** in the site. Using this option, the Version history limit set on site-level is applied to all the new document libraries created in the site and creates a background request to asynchronously process the update on existing document libraries.|
-|**Apply site-level Version history limits to only new document libraries created in a Site:**|To avoid impacting the settings on existing libraries, you can **set a version history limit only for new libraries**. Using this option, the Version history limits set on site-level are only applied to new document libraries created in the site. There are no changes made to the limits on the existing document libraries or on libraries that aren't enabled for versioning in the site.|
-|**Apply version history limits to existing document libraries only in a Site:**|You can update the limits **only on existing document libraries** on a site without setting a site level version history setting for new document libraries. Using this option creates a background request to asynchronously process the update on existing document libraries while allowing the new document libraries created in the site to inherit the organization level version history limits.|
-|**Clear existing limits set on a Site:** |You can **clear the existing limits on a site** to allow new document libraries created in the site to follow organization level limits.<br> **Note:** Clearing a setting on a Site applies only to new document libraries created on the site and doesn't impact the settings on existing doc libraries or trim existing versions.|
+|**Apply to all new and existing document libraries in a site:** |To achieve a consistent version storage policy for a site, you can choose to **set a limit to universally apply to all libraries** in the site. Using this option, the Version history limit set on site-level is applied to all the new document libraries created in the site and creates a background request to asynchronously process the update on existing document libraries.|
+|**Apply to only new document libraries created in a site:**|To avoid impacting the settings on existing libraries, you can **set a version history limit only for new libraries**. Using this option, the Version history limits set on site-level are only applied to new document libraries created in the site. There are no changes made to the limits on the existing document libraries or on libraries that aren't enabled for versioning in the site.|
+|**Apply to existing document libraries only in a site:**|You can update the limits **only on existing document libraries** on a site without setting a site level version history setting for new document libraries. Using this option creates a background request to asynchronously process the update on existing document libraries while allowing the new document libraries created in the site to inherit the organization level version history limits.|
+|**Clear existing limits set on a site:** |You can **clear the existing limits on a site** to allow new document libraries created in the site to follow organization level limits.<br> **Note:** Clearing a setting on a Site applies only to new document libraries created on the site and doesn't impact the settings on existing doc libraries or trim existing versions.|
**Example scenario**
Follow these steps to manage Version history limits for a site by using PowerShe
| | | | View the version history limits set on a site | Get-SPOSite -Identity $siteUrl \| fl Url, EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersionLimit | | Set Automatic version history limits on a site. | To set Automatic Version History Limits for all libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $true`<br><br>Append `-ApplyToNewDocumentLibraries` parameter to apply only to new document libraries on the site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $true`<br>`-ApplyToNewDocumentLibraries` <br><br>Append `-ApplyToExistingDocumentLibraries` to apply only to existing document libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $true`<br>`-ApplyToExistingDocumentLibraries` |
-| Set Manual limits with Count and time parameters on a site. | To set Manual limits with Count and time parameters for all libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`<br><br>Append `-ApplyToNewDocumentLibraries` parameter to apply only to new document libraries on the site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`<br>`-ApplyToNewDocumentLibraries` <br><br>Append `-ApplyToExistingDocumentLibraries` to apply only to existing document libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`<br>`-ApplyToExistingDocumentLibraries` |
-| Set Manual count with no expiration limit on a site. | To set Manual limits with Count limits set the `-ExpireVersionsAfterDays` parameter to `0:`<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0` <br><br>Append `-ApplyToNewDocumentLibraries` parameter to apply only to new document libraries on the site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0`<br>`-ApplyToNewDocumentLibraries` <br><br>Append `-ApplyToExistingDocumentLibraries` to apply only to existing document libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0`<br>`-ApplyToExistingDocumentLibraries` |
+| Set Manual limits with Count and time parameters on a site. | To set Manual limits with Count and time parameters for all libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorwithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`<br><br>Append `-ApplyToNewDocumentLibraries` parameter to apply only to new document libraries on the site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorwithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`<br>`-ApplyToNewDocumentLibraries` <br><br>Append `-ApplyToExistingDocumentLibraries` to apply only to existing document libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>`<br>`-ApplyToExistingDocumentLibraries` |
+| Set Manual count with no expiration limit on a site. | To set Manual limits with Count limits set the `-ExpireVersionsAfterDays` parameter to `0:`<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0` <br><br>Append `-ApplyToNewDocumentLibraries` parameter to apply only to new document libraries on the site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0`<br>`-ApplyToNewDocumentLibraries` <br><br>Append `-ApplyToExistingDocumentLibraries` to apply only to existing document libraries on a site:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0`<br>`-ApplyToExistingDocumentLibraries` |
| Clear the existing version history limits set on a site and inherit Organization version limits on new document libraries created on the site. | `Set-SPOSite -Identity $siteUrl -InheritVersionPolicyFromTenant` | | Cancel in progress update job|`Remove-SPOSiteVersionPolicyJob -Identity $siteUrl` |
SharePoint Trim Versions https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/trim-versions.md
Version trimming workflows allow you to select and apply one of the trimming mod
**Manual expiration trim mode:** Evaluates the age of versions and deletes versions matching the expiration criteria.
-**Example:** In the example below, a trim job is queued to trim versions older than 60 days. On August 31, the job is picked up and it starts permanently deleting versions older than 60 days as of August 31.
+**Example:** In the following example, a trim job is queued to trim versions older than 60 days. On August 31, the job is picked up and it starts permanently deleting versions older than 60 days as of August 31.
:::image type="content" source="media/version-history/manual-expiration-trim-table.png" lightbox="media/version-history/manual-expiration-trim-table.png" alt-text="Diagram of manual expiration.":::
Version trimming workflows allow you to select and apply one of the trimming mod
**Automatic trim mode:** Applies Automatic algorithm to delete existing versions. Depending on the version age, the job will permanently delete versions or set expiration time according to the automatic version storage algorithm. > [!TIP]
-> Consider [performing a 'What-if' analysis](tutorial-run-what-if-analysis.md#run-impact-analysis-of-setting-automatic-version-history-limits) to understand versions that either will be deleted or have expiration time set on them under the Automatic trim mode.
+> You can run the impact analysis of either applying the Manual Count, Expire, or Automatic trim mode to understand the version delete impact under each mode.
## Queue trim job and track progress
SharePoint Tutorial Generate Version Usage Report https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/tutorial-generate-version-usage-report.md
In later tutorials, review how you can run impact analysis on the generated CSV
You can generate a report on the current version storage use on a site by running the `New-SPOSiteFileVersionExpirationReportJob` command or on a library by running the `New-SPOListFileVersionBatchDeleteJob` command.
-In the example below, a job is queued to generate a site-scoped report at the report location, `https://contoso.sharepoint.com/SharedDocuments/SiteReport.csv`.
+In the following example, a job is queued to generate a site-scoped report at the report location, `https://contoso.sharepoint.com/sites/sites1/reports/MyReports/VersionReport.csv`.
```PowerShell New-SPOSiteFileVersionExpirationReportJob -Identity https://contoso.sharepoint.com/sites/site1 -ReportUrl "https://contoso.sharepoint.com/sites/sites1/reports/MyReports/VersionReport.csv" ```
-In the example below, a job is queued to generate a library-scoped report at the report location, `https://contoso.sharepoint.com/SharedDocuments/SiteReport.csv`.
+In the following example, a job is queued to generate a library-scoped report at the report location, `https://contoso.sharepoint.com/sites/sites1/reports/MyReports/VersionReport.csv`.
```PowerShell New-SPOListFileVersionExpirationReportJob -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -ReportUrl "https://contoso.sharepoint.com/sites/sites1/reports/MyReports/VersionReport.csv"
The cmdlet will return a response in JSON format. The returned json response has
| ΓÇ£completedΓÇ¥ | The job has successfully completed and the report is fully populated. | | ΓÇ£in_progressΓÇ¥ | There is an active job. The report is partially populated. | | ΓÇ£no_report_foundΓÇ¥ | There are no active jobs populating the specified file. |
-| ΓÇ£failed, error message:ΓÇ¥ | The job to generate the report has failed due to the error message. |
+| ΓÇ£failedΓÇ¥ | The job to generate the report has failed due to the error message. Check ΓÇ£error_messageΓÇ¥ for the error message from the failure. |
## Understand version report file
HereΓÇÖs an example of file version expiration report and its column breakdown.
:::image type="content" source="media/version-history/expiration-report.png" lightbox="media/version-history/expiration-report.png" alt-text="Screenshot of expiration report.":::
-The first row is the header with the column identifiers containing File Version Identifiers, Version Metadata information, and expiration timestamp. Compact columns are denoted with ΓÇ£.CompactΓÇ¥ post-fix that wonΓÇÖt repeat values if two consecutive rows have the same value. The other rows represent file versions, where each row represents a single version.
+The first row is the header with the column identifiers containing File Version Identifiers, Version Metadata information, and expiration timestamp. Compact columns are denoted with `.Compact` post-fix that wonΓÇÖt repeat values if two consecutive rows have the same value. The other rows represent file versions, where each row represents a single version.
LetΓÇÖs go through the first file version displayed in this report. - File version identifiers: `WebId`, `DocId`, `MajorVersion`, and `MinorVersion` uniquely identify each version in your SharePoint site.
SharePoint Tutorial Queue A Trim Job https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/tutorial-queue-a-trim-job.md
Versions deleted by a trim job are permanently deleted and can't be recovered fr
## Queue a job to trim versions on site You can queue a job to trim versions for all document libraries in the site collection using the `New-SPOSiteFileVersionBatchDeleteJob` PowerShell command. -- Use the `-<DeleteBeforeDays>` parameter to specify the age criteria you wish to apply for deleting versions. Versions older than the specified days are deleted asynchronously in batches in the upcoming days.
+- Use the `<DeleteBeforeDays>` parameter to specify the age criteria you wish to apply for deleting versions. Versions older than the specified days are deleted asynchronously in batches in the upcoming days.
- Use the `<MajorVersionLimit>` to specify the count limit of major versions to store. Oldest versions exceeding the specified count are deleted asynchronously in batches in the upcoming days. - Use the `<Automatic>` parameter to apply Automatic setting trimming logic on existing file versions. ### Example: Queue a job to trim versions based on age for all libraries on a site
-In the example below, the job is queued to trim versions that are older than 180 days old for all document libraries in the site collection `https://contoso.sharepoint.com/sites1`.
+In the following example, the job is queued to trim versions that are older than 180 days for all document libraries in the site collection `https://contoso.sharepoint.com/sites/site1`.
```PowerShell
-New-SPOSiteFileVersionBatchDeleteJob -Identity https://contoso.sharepoint.com/sites/site1 -DeleteBeforeDays 360
+New-SPOSiteFileVersionBatchDeleteJob -Identity https://contoso.sharepoint.com/sites/site1 -DeleteBeforeDays 180
``` ### Example: Queue a job to trim oldest versions exceeding the specified count limit on a site
You can queue a job to trim versions from a particular document library in the s
To delete versions that are older than 360 days in document library 'Documents' in the site collection `https://contoso.sharepoint.com`. ```PowerShell
-New-SPOListFileVersionBatchDeleteJob -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -DeleteBeforeDays 360
+New-SPOListFileVersionBatchDeleteJob -Site https://contoso.sharepoint.com -List "Documents" -DeleteBeforeDays 360
``` ## Track progress of a trim job
SharePoint Version Limits Onedrive Ps https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/version-limits-onedrive-ps.md
Follow these steps to manage Version history limits for a site by using PowerShe
| | | | View the version history limits set for a user | Get-SPOSite -Identity $siteUrl \| fl Url, EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersionLimit | | Set automatic Version history limits for a user | `Set-SPOSite -Identity $siteUrl -EnableAutoExpirationVersionTrim $true` |
-| Set manual limits with count and time parameters for a user | `Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>` |
-| Set manual limits with count with no expiration limit for a user | To set manual limits with count limits set the `-ExpireVersionsAfterDays parameter` to 0:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersions <delete major versions exceeding limit>`<br>`-MajorWithMinorVersions <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0` |
+| Set manual limits with count and time parameters for a user | `Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays <delete versions exceeding time limit set in days>` |
+| Set manual limits with count with no expiration limit for a user | To set manual limits with count limits set the `-ExpireVersionsAfterDays parameter` to 0:<br><br>`Set-SPOSite -Identity $siteUrl`<br>`-EnableAutoExpirationVersionTrim $false`<br>`-MajorVersionLimit <delete major versions exceeding limit>`<br>`-MajorWithMinorVersionsLimit <delete minor versions exceeding limit>`<br>`-ExpireVersionsAfterDays 0` |
| Clear the existing Version history limits for a user<br><br>**Note:** Clearing a setting for a user applies to new versions created on files stored on the userΓÇÖs OneDrive account and doesn't trim existing versions. | `Remove-SPOSiteVersionPolicyJob -Identity $siteUrl` | ## Learn More