Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ Queues a job to trim versions for all document libraries in a site collection.

### AutomaticTrim
```
New-SPOSiteFileVersionBatchDeleteJob [-Identity] <SpoSitePipeBind> [-Automatic] [-BypassSiteLock] [-WhatIf]
[-Confirm] [<CommonParameters>]
New-SPOSiteFileVersionBatchDeleteJob [-Identity] <SpoSitePipeBind> [-Automatic] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

### DeleteOlderThanDays
```
New-SPOSiteFileVersionBatchDeleteJob [-Identity] <SpoSitePipeBind> [-DeleteBeforeDays <Int32>]
[-BypassSiteLock] [-WhatIf] [-Confirm] [<CommonParameters>]
New-SPOSiteFileVersionBatchDeleteJob [-Identity] <SpoSitePipeBind> [-DeleteBeforeDays <Int32>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

### CountLimits
```
New-SPOSiteFileVersionBatchDeleteJob [-Identity] <SpoSitePipeBind> -MajorVersionLimit <Int32>
-MajorWithMinorVersionsLimit <Int32> [-BypassSiteLock] [-WhatIf] [-Confirm] [<CommonParameters>]
-MajorWithMinorVersionsLimit <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -69,14 +69,6 @@ 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
Expand All @@ -94,21 +86,6 @@ 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.

Expand Down Expand Up @@ -221,4 +198,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

[Get-SPOSiteFileVersionBatchDeleteJobProgress](Get-SPOSiteFileVersionBatchDeleteJobProgress.md)

[Remove-SPOSiteFileVersionBatchDeleteJob](Remove-SPOSiteFileVersionBatchDeleteJob.md)
[Remove-SPOSiteFileVersionBatchDeleteJob](Remove-SPOSiteFileVersionBatchDeleteJob.md)