| external help file | sharepointonline.xml |
|---|---|
| Module Name | Microsoft.Online.SharePoint.PowerShell |
| online version | https://learn.microsoft.com/powershell/module/sharepoint-online/set-spositescript |
| applicable | SharePoint Online |
| title | Set-SPOSiteScript |
| schema | 2.0.0 |
| author | trent-green |
| ms.author | trgreen |
| ms.reviewer |
Updates a previously uploaded site script.
Set-SPOSiteScript
-Identity <SPOSiteScriptPipeBind>
-Title <string>
-Content <string>
[-Description <string>]
[-Version <Int32>]
[<CommonParameters>]Updates a previously uploaded site script.
This example updates a previously created site script. Any site designs referencing it execute the updated script.
$newnavscript = @'
{
"$schema": "schema.json",
"actions": [
{
"verb": "addNavLink",
"url": "/Custom Library",
"displayName": "Custom Library Updated",
"isWebRelative": true
},
{
"verb": "addNavLink",
"url": "/Lists/Custom List",
"displayName": "Custom List Updated",
"isWebRelative": true
},
{
"verb": "applyTheme",
"themeName": "Contoso Explorers"
}
],
"bindata": { },
"version": 2
};
'@
Set-SPOSiteScript -Identity edaec4ec-71e2-4026-ac1e-6686bb30190d -Content $newnavscript -Version 2
The id of the site design.
Type: SPOSiteDesignPipeBind
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe display name of the site design.
Type: String
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe JSON value that describes the script. For more information, see the JSON reference.
Type: String
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA description of the script.
Type: String
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA version number of the script.
Type: Int32
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False