Skip to content

Commit 2e51f13

Browse files
Learn Editor: Update Set-SPOSite.md
1 parent 3df3d17 commit 2e51f13

File tree

1 file changed

+131
-4
lines changed
  • sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell

1 file changed

+131
-4
lines changed

sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md

Lines changed: 131 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,21 @@ Set-SPOSite [-Identity] <SpoSitePipeBind> [-InformationBarriersMode <String>]
147147
[-WhatIf] [-Confirm] [<CommonParameters>]
148148
```
149149

150+
### SetSiteFileTypeFileVersionPolicy
151+
152+
153+
```
154+
Set-SPOSite [-Identity] <SpoSitePipeBind> [-InformationBarriersMode <String>] [-EnableAutoExpirationVersionTrim <Boolean>] [-ExpireVersionsAfterDays <Int32>] [-MajorVersionLimit <Int32>] -FileTypesForVersionExpiration <String[]> [-ApplyToNewDocumentLibraries] [-WhatIf] [-Confirm] [<CommonParameters>]
155+
```
156+
157+
### RemoveSiteFileVersionPolicy
158+
159+
160+
```
161+
Set-SPOSite [-Identity] <SpoSitePipeBind> [-InformationBarriersMode <String>] [-ApplyToNewDocumentLibraries]
162+
[-RemoveVersionExpirationFileTypeOverride <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
163+
```
164+
150165
### ClearGroupId
151166

152167
```
@@ -332,6 +347,44 @@ Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -InheritVersion
332347

333348
Example 20 clears the file version setting at site level. The new document libraries will use the Tenant Level setting. It won't impact the existing document libraries.
334349

350+
### Example 21
351+
352+
353+
```powershell
354+
Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $true -FileTypesForVersionExpiration @("Video", "Audio") -ApplyToNewDocumentLibraries
355+
```
356+
357+
Example 21 sets automatic version history limit override for video and audio file types at site level. The new document libraries will use this version setting.
358+
359+
### Example 22
360+
361+
362+
```powershell
363+
Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 30
364+
-FileTypesForVersionExpiration @("Video", "Audio") -ApplyToNewDocumentLibraries
365+
```
366+
367+
Example 22 sets manual version history limit override for video and audio file types at site level by limiting the number of versions and the time (in days) versions are kept. The new document libraries will use this version setting.
368+
369+
### Example 23
370+
371+
372+
```powershell
373+
Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 500 -ExpireVersionsAfterDays 0
374+
-FileTypesForVersionExpiration @("Video", "Audio") -ApplyToNewDocumentLibraries
375+
```
376+
377+
Example 23 sets manual version history limit override for video and audio file types at site level by limiting the number of versions with no time limits. The new document libraries will use this version setting.
378+
379+
### Example 24
380+
381+
382+
```powershell
383+
Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -RemoveVersionExpirationFileTypeOverride @("Video", "Audio") -ApplyToNewDocumentLibraries
384+
```
385+
386+
Example 24 removes the version history limit override for video and audio file types at the site level. The new document libraries will use this version setting.
387+
335388
## PARAMETERS
336389

337390
### -AddInformationSegment
@@ -518,7 +571,7 @@ Apply the version history limits setting to new document libraries.
518571

519572
```yaml
520573
Type: System.Management.Automation.SwitchParameter
521-
Parameter Sets: SetSiteFileVersionPolicy
574+
Parameter Sets: SetSiteFileVersionPolicy, RemoveSiteFileVersionPolicy
522575
Aliases:
523576
524577
Required: False
@@ -528,6 +581,19 @@ Accept pipeline input: False
528581
Accept wildcard characters: False
529582
```
530583

584+
585+
```
586+
Type: SwitchParameter
587+
Parameter Sets: SetSiteFileTypeFileVersionPolicy
588+
Aliases:
589+
590+
Required: True
591+
Position: Named
592+
Default value: None
593+
Accept pipeline input: False
594+
Accept wildcard characters: False
595+
```
596+
531597
### -AuthenticationContextAccessType
532598
533599
> Applicable: SharePoint Online
@@ -1045,7 +1111,7 @@ PARAMVALUE: False | True
10451111

10461112
```yaml
10471113
Type: System.Boolean
1048-
Parameter Sets: SetSiteFileVersionPolicy
1114+
Parameter Sets: SetSiteFileVersionPolicy, SetSiteFileTypeFileVersionPolicy
10491115
Aliases:
10501116
10511117
Required: False
@@ -1140,7 +1206,7 @@ PARAMVALUE: Int32
11401206

11411207
```yaml
11421208
Type: System.Int32
1143-
Parameter Sets: SetSiteFileVersionPolicy
1209+
Parameter Sets: SetSiteFileVersionPolicy, SetSiteFileTypeFileVersionPolicy
11441210
Aliases:
11451211
11461212
Required: False
@@ -1170,6 +1236,43 @@ Accept pipeline input: False
11701236
Accept wildcard characters: False
11711237
```
11721238

1239+
### -FileTypesForVersionExpiration
1240+
1241+
> Applicable: SharePoint Online
1242+
1243+
An array of file type names. The supported file type names are:
1244+
1245+
- Audio
1246+
1247+
- OutlookPST
1248+
1249+
- Video
1250+
1251+
Apply the version history limits to a set of file types so that they no longer follow the default version history limits. It is used in combination with the following parameters:
1252+
1253+
- EnableAutoExpirationVersionTrim
1254+
1255+
- MajorVersionLimit
1256+
1257+
- ExpireVersionsAfterDays
1258+
1259+
This must be used with **ApplyToNewDocumentLibraries** switch set to true, because the version history limits are only applied on new document libraries in the site.
1260+
1261+
1262+
1263+
1264+
```
1265+
Type: String[]
1266+
Parameter Sets: SetSiteFileTypeFileVersionPolicy
1267+
Aliases:
1268+
1269+
Required: True
1270+
Position: Named
1271+
Default value: None
1272+
Accept pipeline input: False
1273+
Accept wildcard characters: False
1274+
```
1275+
11731276
### -HidePeoplePreviewingFiles
11741277
11751278
> Applicable: SharePoint Online
@@ -1430,7 +1533,7 @@ PARAMVALUE: Int32
14301533

14311534
```yaml
14321535
Type: System.Int32
1433-
Parameter Sets: SetSiteFileVersionPolicy
1536+
Parameter Sets: SetSiteFileVersionPolicy, SetSiteFileTypeFileVersionPolicy
14341537
Aliases:
14351538
14361539
Required: False
@@ -1701,6 +1804,30 @@ Accept pipeline input: False
17011804
Accept wildcard characters: False
17021805
```
17031806

1807+
### -RemoveVersionExpirationFileTypeOverride
1808+
1809+
> Applicable: SharePoint Online
1810+
1811+
An array of file type names. Removes the version history limits to a set of file types so that they will follow the default version history limits.
1812+
1813+
This must be used with **ApplyToNewDocumentLibraries** switch set to true, because the version history limits are only applied on new document libraries in the site.
1814+
1815+
> [!NOTE]
1816+
> This feature is currently in preview and may not be available in your tenant.
1817+
1818+
1819+
```yaml
1820+
Type: String[]
1821+
Parameter Sets: RemoveSiteFileVersionPolicy
1822+
Aliases:
1823+
1824+
Required: False
1825+
Position: Named
1826+
Default value: None
1827+
Accept pipeline input: False
1828+
Accept wildcard characters: False
1829+
```
1830+
17041831
### -RequestFilesLinkEnabled
17051832

17061833
> Applicable: SharePoint Online

0 commit comments

Comments
 (0)