Set-SPOSiteScript
更新先前上傳的網站腳本。
Syntax
Set-SPOSiteScript
-Identity <SPOSiteScriptPipeBind>
-Title <string>
-Content <string>
[-Description <string>]
[-Version <Int32>]
[<CommonParameters>]
Description
更新先前上傳的網站腳本。
範例
範例 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
網站設計的識別碼。
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 |