Get-SPOSiteScriptFromWeb
从现有 SharePoint 网站创建网站脚本语法。
语法
Get-SPOSiteScriptFromWeb
[-WebUrl] <string>
[-IncludedLists <string[]>]
[-IncludeBranding]
[-IncludeTheme]
[-IncludeRegionalSettings]
[-IncludeSiteExternalSharingCapability]
[-IncludeLinksToExportedItems]
[<CommonParameters>]
说明
使用现有 SharePoint 网站输出 JSON Blob,该 Blob 可用于创建网站脚本以用于网站设计。
示例
示例 1
此示例从现有网站创建站点脚本输出,并将其写入变量。 然后引用此变量以创建站点脚本。
C:\> $extracted = Get-SPOSiteScriptFromWeb `
-WebUrl https://contoso.sharepoint.com/sites/template `
-IncludeBranding `
-IncludeTheme `
-IncludeRegionalSettings `
-IncludeSiteExternalSharingCapability `
-IncludeLinksToExportedItems `
-IncludedLists ("Shared%20Documents", "Lists/Project%20Activities")
C:\> Add-SPOSiteScript `
-Title "Contoso template site" `
-Description "This is a copy of a site collection." `
-Content $extracted
参数
-IncludeBranding
一个开关,如果提供,将提取站点品牌的配置。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-IncludedLists
一个或多个列表的数组。 每个都由列表 url 标识。
注意:目前不会导出导航节点。
Type: | string[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-IncludeLinksToExportedItems
一个开关,如果提供,则提取导航链接。 为了导出指向列表的导航链接,还需要在请求中包含列表。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-IncludeRegionalSettings
一个开关,如果提供,将提取站点的区域设置。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-IncludeSiteExternalSharingCapability
一个开关,如果提供,将提取站点的外部共享功能。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-IncludeTheme
一个开关,如果已提供,则使用 themeJson 属性提取网站的自定义主题。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |
-WebUrl
以网站 HTTPS 开头的 URL,用于检索网站脚本。
Type: | string |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Online |