Set-SPOSiteScript
汇报以前上传的网站脚本。
语法
Set-SPOSiteScript
-Identity <SPOSiteScriptPipeBind>
-Title <string>
-Content <string>
[-Description <string>]
[-Version <Int32>]
[<CommonParameters>]
说明
汇报以前上传的网站脚本。
示例
示例 1
此示例更新以前创建的网站脚本。 引用它的任何网站设计都执行更新的脚本。
$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
参数
-Content
描述脚本的 JSON 值。 有关详细信息,请参阅 JSON 参考。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-Description
脚本的说明。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-Identity
网站设计的 ID。
Type: | SPOSiteDesignPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-Title
网站设计的显示名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-Version
脚本的版本号。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |