Set-PnPSiteScript

Updates an existing Site Script on the current tenant.

Syntax

Set-PnPSiteScript
   -Identity <TenantSiteScriptPipeBind>
                    [-Title <String>]
                    [-Description <String>]
                    [-Content <String>]
                    [-Version <Int>]
                    [-Connection <SPOnlineConnection>]

Examples

------------------EXAMPLE 1------------------

Set-PnPSiteScript -Identity f1d55d9b-b116-4f54-bc00-164a51e7e47f -Title "My Site Script"

Updates an existing Site Script and changes the title.

------------------EXAMPLE 2------------------

$script = Get-PnPSiteScript -Identity f1d55d9b-b116-4f54-bc00-164a51e7e47f 
Set-PnPSiteScript -Identity $script -Title "My Site Script"

Updates an existing Site Script and changes the title.

Parameters

-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.

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Content

A JSON string containing the site script

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Description

The description of the site script

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Identity

The guid or an object representing the site script

Type:TenantSiteScriptPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Title

The title of the site script

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Version

Specifies the version of the site script

Type:Int
Position:Named
Accept pipeline input:False
Accept wildcard characters:False