Add-SPOSiteScript
直接またはサイト デザインで使用するための新しいサイト スクリプトをアップロードします。
構文
Default (既定)
Add-SPOSiteScript
-Title <String>
-Content <String>
[-Description <String>]
[<CommonParameters>]
説明
直接またはサイト デザインで使用するための新しいサイト スクリプトをアップロードします。
例
例 1
この例では、次のスクリプトから新しいサイト ロゴをファイルに追加します。
{
"$schema": "schema.json",
"actions": [
{
"verb": "setSiteLogo",
"url": "https://contoso.sharepoint.com/SiteAssets/company-logo.png"
}
]
}
Get-Content 'c:\scripts\site-script.json' -Raw | Add-SPOSiteScript -Title "Customer logo" -Description "Applies customer logo for customer sites"
例 2
次の使用例は、サイトの外部共有機能を ExternalUserAndGuestSharing オプションに設定します。 また、このスクリプトを使用するコミュニケーション サイト (68) のサイト デザインも追加します。
$script = @'
{
"$schema": "schema.json",
"actions": [
{
"verb": "setSiteExternalSharingCapability",
"capability": "ExternalUserAndGuestSharing"
}
],
"bindata": { },
"version": 1
};
'@
Add-SPOSiteScript -Title "External User and Guest Sharing site script" -Description "A site script to manage the
guest access of a site" -Content $script
Id : ea9e3a52-7c12-4da8-a901-4912be8a76bc
Title : External User and Guest Sharing site script
Description : A site script to manage theguest access of a site
Content :
Version : 0
Add-SPOSiteDesign -Title "Communication Site with External Users and Guest Sharing" -WebTemplate "68" -SiteScripts "ea9e3a52-7c12-4da8-a901-4912be8a76bc"
パラメーター
-Content
適用対象: SharePoint Online
スクリプトを記述する JSON 値。 詳細については、 JSON リファレンスを参照してください。
パラメーターのプロパティ
| 型: | System.String |
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | True |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-Description
適用対象: SharePoint Online
スクリプトの説明。
パラメーターのプロパティ
| 型: | System.String |
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | False |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
-Title
適用対象: SharePoint Online
サイト デザインの表示名。
パラメーターのプロパティ
| 型: | System.String |
| 規定値: | None |
| ワイルドカードのサポート: | False |
| DontShow: | False |
パラメーター セット
(All)
| 配置: | Named |
| 必須: | True |
| パイプラインからの値: | False |
| プロパティ名別のパイプラインからの値: | False |
| 残りの引数からの値: | False |
CommonParameters
このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、「about_CommonParameters」を参照してください。