当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 使用 PowerShell 在 SharePoint 2013 中应用主题

作者:精品下载站 日期:2024-12-14 14:02:52 浏览:12 分类:玩电脑

使用 PowerShell 在 SharePoint 2013 中应用主题


主题是将品牌应用到 SharePoint 网站的快速、简单的方法。在 SharePoint 2013 中,主题进行了更改并重新设计为“组合外观”功能。正如它听起来“组合”的外观一样,它只是通过组合设计元素来定义主题:母版页 - 又称网站布局、颜色主题、字体方案和背景图像。阅读更多:SharePoint 中的组合外观功能

在 SharePoint 2013 中以编程方式应用组合外观

如果您想将包含母版页、图像文件、字体架构的组合外观统一应用于所有站点,您可以使用 PowerShell。


Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

#Variables for processing
$WebURL="https://portal.crescent.com/"
$ColorPaletteURL="/_catalogs/theme/15/Palette015.spcolor"
$FontSchemeURL="/_catalogs/theme/15/fontscheme005.spfont"
$BackgroundImgURL="/_catalogs/theme/15/Tulips.jpg"

#Get the Web
$web = Get-SPWeb $WebURL

#Apply theme
$web.ApplyTheme($ColorPaletteURL, $FontSchemeURL, $BackgroundImgURL, $true)
$web.Update()

这适用于给定网站的主题。

[玩转系统] 使用 PowerShell 在 SharePoint 2013 中应用主题

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯