From 5fee4b3194ceb3ff8cc43cee3e61d40639c571a2 Mon Sep 17 00:00:00 2001 From: blarrywangmsft <129248125+blarrywangmsft@users.noreply.github.com> Date: Tue, 7 Jul 2026 09:11:52 -0700 Subject: [PATCH 1/3] Learn Editor: Update New-SPOSiteFileVersionBatchDeleteJob.md --- .../New-SPOSiteFileVersionBatchDeleteJob.md | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteFileVersionBatchDeleteJob.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteFileVersionBatchDeleteJob.md index f8800eff6..9f98a84b0 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteFileVersionBatchDeleteJob.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteFileVersionBatchDeleteJob.md @@ -21,20 +21,20 @@ Queues a job to trim versions for all document libraries in a site collection. ### AutomaticTrim ``` -New-SPOSiteFileVersionBatchDeleteJob [-Identity] [-Automatic] [-WhatIf] [-Confirm] - [] +New-SPOSiteFileVersionBatchDeleteJob [-Identity] [-Automatic] [-BypassSiteLock] [-WhatIf] + [-Confirm] [] ``` ### DeleteOlderThanDays ``` -New-SPOSiteFileVersionBatchDeleteJob [-Identity] [-DeleteBeforeDays ] [-WhatIf] - [-Confirm] [] +New-SPOSiteFileVersionBatchDeleteJob [-Identity] [-DeleteBeforeDays ] + [-BypassSiteLock] [-WhatIf] [-Confirm] [] ``` ### CountLimits ``` New-SPOSiteFileVersionBatchDeleteJob [-Identity] -MajorVersionLimit - -MajorWithMinorVersionsLimit [-WhatIf] [-Confirm] [] + -MajorWithMinorVersionsLimit [-BypassSiteLock] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -69,6 +69,14 @@ New-SPOSiteFileVersionBatchDeleteJob -Identity https://contoso.sharepoint.com/si Example 3 starts a trim job that will delete file versions in the site collection based on the version count limits. +### EXAMPLE 4 + +```powershell +New-SPOSiteFileVersionBatchDeleteJob -Identity https://contoso.sharepoint.com/sites/site1 -Automatic -BypassSiteLock +``` + +Example 4 starts a trim job with automatic version history limit algorithm and bypasses site locks. + ## PARAMETERS ### -Automatic @@ -86,6 +94,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -BypassSiteLock +The job will be allowed to bypass site lock. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DeleteBeforeDays The minimum age of file versions to trim. In other words, all file versions that are older than this number of days will be deleted. From edcf7b7c49ca9f3ce9229d5d325b1adb2352b570 Mon Sep 17 00:00:00 2001 From: blarrywangmsft <129248125+blarrywangmsft@users.noreply.github.com> Date: Tue, 7 Jul 2026 09:31:45 -0700 Subject: [PATCH 2/3] Learn Editor: Update New-SPOSiteManageVersionPolicyJob.md --- .../New-SPOSiteManageVersionPolicyJob.md | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md index 03f040c46..d79c5cda6 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md @@ -21,15 +21,15 @@ Starts a background job to manage file versions and version history limits for a ## SYNTAX ### MandatoryTrimOptionalSync -```powershell +``` New-SPOSiteManageVersionPolicyJob [-Identity] [-FileTypes ] [-ExcludeDefaultPolicy] - [-TrimUseListPolicy] [-SyncListPolicy] [-WhatIf] [-Confirm] [] + [-TrimUseListPolicy] [-SyncListPolicy] [-BypassSiteLock] [-WhatIf] [-Confirm] [] ``` ### MandatorySync ``` New-SPOSiteManageVersionPolicyJob [-Identity] [-FileTypes ] [-ExcludeDefaultPolicy] - [-SyncListPolicy] [-WhatIf] [-Confirm] [] + [-SyncListPolicy] [-BypassSiteLock] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -102,6 +102,21 @@ Apply the site version history limits (including file type overrides) to existin ## PARAMETERS +### -BypassSiteLock +Indicates whether to allow the job to bypass site lock. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. From 6b58db475de66f8e591c7df1ceb1ff3ebbef62a4 Mon Sep 17 00:00:00 2001 From: blarrywangmsft <129248125+blarrywangmsft@users.noreply.github.com> Date: Tue, 7 Jul 2026 09:31:56 -0700 Subject: [PATCH 3/3] Learn Editor: Update New-SPOSiteManageVersionPolicyJob.md