Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor documentation fixes #3853

Merged
merged 9 commits into from
Apr 8, 2024
96 changes: 57 additions & 39 deletions documentation/Set-PnPSiteVersionPolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ online version: https://pnp.github.io/powershell/cmdlets/Set-PnPSiteVersionPolic
# Set-PnPSiteVersionPolicy

## SYNOPSIS
Set file version policy related properties on the site.
Sets file version policy related properties on the site.

## SYNTAX

Expand All @@ -27,98 +27,109 @@ Set-PnPSiteVersionPolicy
[-Connection <PnPConnection>]
```

## DESCRIPTION
Configures the versioning policy for a SharePoint Online site collection.

## EXAMPLES

### EXAMPLE 1
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $true
```

Set AutoExpiration file version trim mode for a site. The new document libraries will use this version setting. Also create a request to set the file version trim mode as AutoExpiration for existing document libraries that enabled versioning.
This example sets AutoExpiration file version trim mode for a site. The new document libraries will use this version setting. Also creates a request to set the file version trim mode as AutoExpiration for existing document libraries that enabled versioning.

### EXAMPLE 2
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $false -MajorVersions 100 -MajorWithMinorVersions 10 -ExpireVersionsAfterDays 200
```

Set ExpireAfter file version trim mode for a site. The new document libraries will use this version setting. Also create a request to set the file version trim mode as ExpireAfter for existing document libraries that enabled versioning.
This example sets ExpireAfter file version trim mode for a site. The new document libraries will use this version setting. Also creates a request to set the file version trim mode as ExpireAfter for existing document libraries that enabled versioning.

### EXAMPLE 3
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $false -MajorVersions 300 -MajorWithMinorVersions 20 -ExpireVersionsAfterDays 0
```

Set NoExpiration file version trim mode for a site. The new document libraries will use this version setting. Also create a request to set the file version trim mode as NoExpiration for existing document libraries that enabled versioning.
Example 3 sets NoExpiration file version trim mode for a site. The new document libraries will use this version setting. Also creates a request to set the file version trim mode as NoExpiration for existing document libraries that enabled versioning.

### EXAMPLE 4
```powershell
Set-PnPSiteVersionPolicy -InheritFromTenant
```

Clear the file version setting on a site. The new document libraries will use the tenant level setting.
Example 4 clears the file version setting on a site. The new document libraries will use the tenant level setting.

### EXAMPLE 5
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $true -ApplyToNewDocumentLibraries
```

Set AutoExpiration file version trim mode for a site. The new document libraries will use this version setting.
This example sets AutoExpiration file version trim mode for a site. The new document libraries will use this version setting.

### EXAMPLE 6
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $false -MajorVersions 100 -ExpireVersionsAfterDays 200 -ApplyToNewDocumentLibraries
```

Set ExpireAfter file version trim mode for a site. The new document libraries will use this version setting.
This example sets ExpireAfter file version trim mode for a site. The new document libraries will use this version setting.

### EXAMPLE 7
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $false -MajorVersions 300 -ExpireVersionsAfterDays 0 -ApplyToNewDocumentLibraries
```

Set NoExpiration file version trim mode for a site. The new document libraries will use this version setting.
Example 7 sets NoExpiration file version trim mode for a site. The new document libraries will use this version setting.

### EXAMPLE 8
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $true -ApplyToExistingDocumentLibraries
```

Create a request to set the file version trim mode as AutoExpiration for existing document libraries that enabled versioning.
Example 8 creates a request to set the file version trim mode as AutoExpiration for existing document libraries that enabled versioning.

### EXAMPLE 9
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $false -MajorVersions 100 -MajorWithMinorVersions 5 -ExpireVersionsAfterDays 200 -ApplyToExistingDocumentLibraries
```

Create a request to set the file version trim mode as ExpireAfter for existing document libraries that enabled versioning.
This example creates a request to set the file version trim mode as ExpireAfter for existing document libraries that enabled versioning.

### EXAMPLE 10
```powershell
Set-PnPSiteVersionPolicy -EnableAutoExpirationVersionTrim $false -MajorVersions 100 -MajorWithMinorVersions 5 -ExpireVersionsAfterDays 0 -ApplyToExistingDocumentLibraries
```

Create a request to set the file version trim mode as NoExpiration for existing document libraries that enabled versioning.
Example 10 creates a request to set the file version trim mode as NoExpiration for existing document libraries that enabled versioning.

### EXAMPLE 11
```powershell
Set-PnPSiteVersionPolicy -CancelForExistingDocumentLibraries
```

Cancel the existing request which sets the file version trim mode for existing document libraries on a site.
This example cancels the existing request which sets the file version trim mode for existing document libraries on a site.

## PARAMETERS

### -EnableAutoExpirationVersionTrim
Enable or disable AutoExpiration version trim for the document libraries on the site. Set to $true to enable, $false to disable.
### -ApplyToNewDocumentLibraries
Sets site version policy for new document libraries. Works with parameters EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersions and MajorWithMinorVersions.

Parameter ExpireVersionsAfterDays is required when EnableAutoExpirationVersionTrim is false. Set it to 0 for NoExpiration, set it to greater or equal to 30 for ExpireAfter.
```yaml
Type: SwitchParameter
Parameter Sets: Set Properties

Parameter MajorVersions is required when EnableAutoExpirationVersionTrim is false.
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

Parameter MajorWithMinorVersions is required when EnableAutoExpirationVersionTrim is false and the setting is for document libraries that including existing ones. It is used when minor version is enabled on the document libraries.
### -ApplyToExistingDocumentLibraries
Creates a request to set the file version trim mode for existing document libraries that enabled versioning. Works with parameters EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersions and MajorWithMinorVersions.

```yaml
Type: Boolean
Type: SwitchParameter
Parameter Sets: Set Properties

Required: False
Expand All @@ -128,11 +139,11 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ExpireVersionsAfterDays
Expire the version after the days. Work with parameter EnableAutoExpirationVersionTrim. Please see description in EnableAutoExpirationVersionTrim.
### -CancelForExistingDocumentLibraries
Cancels the existing request which sets the file version trim mode for existing document libraries on a site.

```yaml
Type: UInt32
Type: SwitchParameter
Parameter Sets: Set Properties

Required: False
Expand All @@ -142,12 +153,12 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MajorVersions
Maximum major versions to keep. Work with parameter EnableAutoExpirationVersionTrim. Please see description in EnableAutoExpirationVersionTrim.
### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

```yaml
Type: UInt32
Parameter Sets: Set Properties
Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Expand All @@ -156,11 +167,17 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MajorWithMinorVersions
Maximum major versions for which to keep minor versions. Work with parameter EnableAutoExpirationVersionTrim. Please see description in EnableAutoExpirationVersionTrim.
### -EnableAutoExpirationVersionTrim
Enables or disables AutoExpiration version trim for the document libraries on the site. Set to $true to enable, $false to disable.

Parameter ExpireVersionsAfterDays is required when EnableAutoExpirationVersionTrim is false. Set it to 0 for NoExpiration, set it to greater or equal to 30 for ExpireAfter.

Parameter MajorVersions is required when EnableAutoExpirationVersionTrim is false.

Parameter MajorWithMinorVersions is required when EnableAutoExpirationVersionTrim is false and the setting is for document libraries that including existing ones. It is used when minor version is enabled on the document libraries.

```yaml
Type: UInt32
Type: Boolean
Parameter Sets: Set Properties

Required: False
Expand All @@ -170,11 +187,11 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -InheritFromTenant
Clear the file version setting on a site. The new document libraries will use the tenant level setting.
### -ExpireVersionsAfterDays
Expires the version after the days. Works with parameter EnableAutoExpirationVersionTrim. Please see description in EnableAutoExpirationVersionTrim.

```yaml
Type: SwitchParameter
Type: UInt32
Parameter Sets: Set Properties

Required: False
Expand All @@ -184,8 +201,8 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ApplyToNewDocumentLibraries
Set site version policy for new document libraries. Work with parameters EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersions and MajorWithMinorVersions.
### -InheritFromTenant
Clears the file version setting on a site. The new document libraries will use the tenant level setting.

```yaml
Type: SwitchParameter
Expand All @@ -198,11 +215,11 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ApplyToExistingDocumentLibraries
Create a request to set the file version trim mode for existing document libraries that enabled versioning. Work with parameters EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersions and MajorWithMinorVersions.
### -MajorVersions
Maximum major versions to keep. Works with parameter EnableAutoExpirationVersionTrim. Please see description in EnableAutoExpirationVersionTrim.

```yaml
Type: SwitchParameter
Type: UInt32
Parameter Sets: Set Properties

Required: False
Expand All @@ -212,11 +229,11 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -CancelForExistingDocumentLibraries
Cancel the existing request which sets the file version trim mode for existing document libraries on a site.
### -MajorWithMinorVersions
Maximum major versions for which to keep minor versions. Works with parameter EnableAutoExpirationVersionTrim. Please see description in EnableAutoExpirationVersionTrim.

```yaml
Type: SwitchParameter
Type: UInt32
Parameter Sets: Set Properties

Required: False
Expand All @@ -226,6 +243,7 @@ Accept pipeline input: False
Accept wildcard characters: False
```


## RELATED LINKS

[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
Expand Down
22 changes: 4 additions & 18 deletions documentation/Set-PnPStorageEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ Allows to set Storage Entities / Farm Properties in either the tenant scoped app
Set-PnPStorageEntity -Key MyKey -Value "MyValue" -Comment "My Comment" -Description "My Description"
```

Sets an existing or adds a new storage entity / farm property at tenant level.
Sets an existing or adds a new storage entity / farm property at the tenant level.

### EXAMPLE 2
```powershell
Set-PnPStorageEntity -Scope Site -Key MyKey -Value "MyValue" -Comment "My Comment" -Description "My Description"
```

Sets an existing or adds a new storage entity site collection level.
Sets an existing or adds a new storage entity at the site collection level.

## PARAMETERS

### -Comment
The comment to set.
Specifies additional comments related to the storage entity being set.

```yaml
Type: String
Expand Down Expand Up @@ -107,7 +107,7 @@ Accepted values: Site, Tenant

Required: False
Position: Named
Default value: None
Default value: Tenant
Accept pipeline input: False
Accept wildcard characters: False
```
Expand All @@ -126,20 +126,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## RELATED LINKS

Expand Down
30 changes: 15 additions & 15 deletions documentation/Set-PnPStructuralNavigationCacheSiteState.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ The Set-PnPStructuralNavigationCacheSiteState cmdlet can be used to enable or di

## EXAMPLES

### Example 1
### EXAMPLE 1
```powershell
Set-PnPStructuralNavigationCacheSiteState -IsEnabled $true -SiteUrl "https://contoso.sharepoint.com/sites/product/"
```

This example enables caching for all webs in the site collection https://contoso.sharepoint.com/sites/product/.

### Example 2
### EXAMPLE 2
```powershell
Set-PnPStructuralNavigationCacheSiteState -IsEnabled $false -SiteUrl "https://contoso.sharepoint.com/sites/product/"
```
Expand All @@ -39,41 +39,41 @@ This example disables caching for all webs in the site collection https://contos

## PARAMETERS

### -IsEnabled
$true to enable caching, $false to disable caching.
### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

```yaml
Type: Boolean
Type: PnPConnection
Parameter Sets: (All)
Aliases:
Required: True

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SiteUrl
Specifies the absolute URL for the site collection's root web that needs its caching state to be set.
### -IsEnabled
$true to enable caching, $false to disable caching.

```yaml
Type: String
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
### -SiteUrl
Specifies the absolute URL for the site collection's root web that needs its caching state to be set.

```yaml
Type: PnPConnection
Type: String
Parameter Sets: (All)

Aliases:
Required: False
Position: Named
Default value: None
Expand Down
Loading
Loading