Skip to content
Merged
Show file tree
Hide file tree
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] [-WhatIf] [-Confirm]
[<CommonParameters>]
New-SPOSiteFileVersionBatchDeleteJob [-Identity] <SpoSitePipeBind> [-Automatic] [-BypassSiteLock] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

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

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

## DESCRIPTION
Expand Down Expand Up @@ -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
Expand All @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Starts a background job to manage file versions and version history limits for a
## SYNTAX

### MandatoryTrimOptionalSync
```powershell
```
New-SPOSiteManageVersionPolicyJob [-Identity] <SpoSitePipeBind> [-FileTypes <String[]>] [-ExcludeDefaultPolicy]
[-TrimUseListPolicy] [-SyncListPolicy] [-WhatIf] [-Confirm] [<CommonParameters>]
[-TrimUseListPolicy] [-SyncListPolicy] [-BypassSiteLock] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### MandatorySync
```
New-SPOSiteManageVersionPolicyJob [-Identity] <SpoSitePipeBind> [-FileTypes <String[]>] [-ExcludeDefaultPolicy]
[-SyncListPolicy] [-WhatIf] [-Confirm] [<CommonParameters>]
[-SyncListPolicy] [-BypassSiteLock] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -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.

Expand Down