Skip to content

Commit a5c0fe6

Browse files
Learn Editor: Update New-SPOSiteManageVersionPolicyJob.md
1 parent 0cb3db8 commit a5c0fe6

1 file changed

Lines changed: 154 additions & 8 deletions

File tree

sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOSiteManageVersionPolicyJob.md

Lines changed: 154 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# New-SPOSiteManageVersionPolicyJob
99

1010
## SYNOPSIS
11-
{{ Fill in the Synopsis }}
11+
Starts a background job that manages the file versions and version history limits of all of its document libraries.
1212

1313
## SYNTAX
1414

@@ -25,16 +25,154 @@ New-SPOSiteManageVersionPolicyJob [-Identity] <SpoSitePipeBind> [-FileTypes <Str
2525
```
2626

2727
## DESCRIPTION
28-
{{ Fill in the Description }}
28+
Starts a background job that does one or more of the following:
29+
30+
- set the version history limits of all document libraries to that of the site;
31+
32+
- trims version in all document libraries according to each list's version history limits.
33+
34+
This effect can be applied to default version history limits, or a set of file types. Supported file types are:
35+
36+
- Audio
37+
38+
- OutlookPST
39+
40+
- Video
2941

3042
## EXAMPLES
3143

3244
### Example 1
45+
46+
```powershell
47+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -FileTypes @("Video","Audio")
48+
```
49+
50+
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.
51+
52+
### Example 2
53+
54+
55+
```powershell
56+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -FileTypes @("Video","Audio") -ExcludeDefaultPolicy
57+
```
58+
59+
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.
60+
61+
### Example 3
62+
63+
3364
```powershell
34-
PS C:\> {{ Add example code here }}
65+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -FileTypes @()
3566
```
3667

37-
{{ Add example description here }}
68+
Apply the site 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.
69+
70+
### Example 4
71+
72+
73+
```powershell
74+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy
75+
```
76+
77+
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.
78+
79+
### Example 5
80+
81+
82+
```powershell
83+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -ExcludeDefaultPolicy
84+
```
85+
86+
Apply the site level all file type version history limit overrides to existing document libraries. If the site is not broken inheritance for version history limits, then it applies the tenant version history limits.
87+
88+
### Example 6
89+
90+
```powershell
91+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -TrimUseListPolicy -FileTypes @("Video","Audio")
92+
```
93+
94+
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.
95+
96+
### Example 7
97+
98+
99+
```powershell
100+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -TrimUseListPolicy -FileTypes @("Video","Audio") -ExcludeDefaultPolicy
101+
```
102+
103+
Trim video and audio file versions based on each document library's version history limits.
104+
105+
### Example 8
106+
107+
108+
```powershell
109+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -TrimUseListPolicy -FileTypes @()
110+
```
111+
112+
Trim file versions that don't have a file type override based on each document library's version history limits.
113+
114+
### Example 9
115+
116+
117+
```powershell
118+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -TrimUseListPolicy
119+
```
120+
121+
Trim all file versions based on each document library's version history limits.
122+
123+
### Example 10
124+
125+
126+
```powershell
127+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -TrimUseListPolicy -ExcludeDefaultPolicy
128+
```
129+
130+
Trim all file versions that have a file type override based on each document library's version history limits.
131+
132+
133+
### Example 11
134+
135+
```powershell
136+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -FileTypes @("Video","Audio")
137+
```
138+
139+
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. Then 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.
140+
141+
### Example 12
142+
143+
144+
```powershell
145+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -TrimUseListPolicy -FileTypes @("Video","Audio") -ExcludeDefaultPolicy
146+
```
147+
148+
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. Then trim video and audio file versions based on each document library's version history limits.
149+
150+
### Example 13
151+
152+
153+
```powershell
154+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -TrimUseListPolicy -FileTypes @()
155+
```
156+
157+
Apply the site 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. Then trim file versions that don't have a file type override based on each document library's version history limits.
158+
159+
### Example 14
160+
161+
162+
```powershell
163+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -TrimUseListPolicy
164+
```
165+
166+
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.
167+
168+
### Example 15
169+
170+
171+
```powershell
172+
New-SPOSiteManageVersionPolicyJob -Identity $siteUrl -SyncListPolicy -TrimUseListPolicy -ExcludeDefaultPolicy
173+
```
174+
175+
Apply the site level all file type version history limit 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 that have a file type override based on each document library's version history limits.
38176

39177
## PARAMETERS
40178

@@ -54,7 +192,7 @@ Accept wildcard characters: False
54192
```
55193
56194
### -ExcludeDefaultPolicy
57-
{{ Fill ExcludeDefaultPolicy Description }}
195+
Indicates whether to update the default version history limits and/or to trim file versions that don't have an override.
58196
59197
```yaml
60198
Type: SwitchParameter
@@ -69,7 +207,13 @@ Accept wildcard characters: False
69207
```
70208
71209
### -FileTypes
72-
{{ Fill FileTypes Description }}
210+
An array of file type names. The supported file type names are:
211+
212+
- Audio
213+
214+
- OutlookPST
215+
216+
- Video
73217
74218
```yaml
75219
Type: String[]
@@ -99,7 +243,7 @@ Accept wildcard characters: False
99243
```
100244
101245
### -SyncListPolicy
102-
{{ Fill SyncListPolicy Description }}
246+
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.
103247
104248
```yaml
105249
Type: SwitchParameter
@@ -126,7 +270,7 @@ Accept wildcard characters: False
126270
```
127271
128272
### -TrimUseListPolicy
129-
{{ Fill TrimUseListPolicy Description }}
273+
Indicates whether to trim existing versions.
130274
131275
```yaml
132276
Type: SwitchParameter
@@ -169,3 +313,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
169313
## NOTES
170314
171315
## RELATED LINKS
316+
[Get-SPOSiteManageVersionPolicyJobProgress](Get-SPOSiteManageVersionPolicyJobProgress.md)
317+
[Remove-SPOSiteManageVersionPolicyJob](Remove-SPOSiteManageVersionPolicyJob.md)

0 commit comments

Comments
 (0)