Set-PnPStructuralNavigationCacheWebState

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPStructuralNavigationCacheWebState.md to change this file.

Enable or disable caching for all webs in a site collection.

Syntax

Set-PnPStructuralNavigationCacheWebState
   -IsEnabled <Boolean>
   [-WebUrl <String>]

Description

The Set-PnPStructuralNavigationCacheWebtate cmdlet can be used to enable or disable caching for a webs in a site collection. If the WebUrl parameter has not been specified the currently connected to site will be used.

Examples

Example 1

Set-PnPStructuralNavigationCacheWebState -IsEnabled $true -WebUrl "https://contoso.sharepoint.com/sites/product/electronics"

This example enables caching for the web https://contoso.sharepoint.com/sites/product/electronics.

Example 1

Set-PnPStructuralNavigationCacheSiteState -IsEnabled $false -SiteUrl "https://contoso.sharepoint.com/sites/product/electronics"

This example disabled caching for all webs in the web https://contoso.sharepoint.com/sites/product/electronics.

Parameters

-IsEnabled

$true to enable caching, $false to disable caching..

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteUrl

Specifies the absolute URL for the web that needs its caching state set.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False