Sharepoint 开启发布功能的PowerShell

  前言

  最近,需要一段开启SharePoint站点发布功能的PowerShell命令,因为很多站点批量开启,去网站集功能和网站功能里分别点很麻烦,就搜了这样的命令,如果有需要的可以看一看。

$siteUrl = "http://localhost:port/"
$siteCollection = Get-SPSite $siteUrl
Enable-SPFeature "PublishingSite" -Url $siteCollection.Url -force
Enable-SPFeature "PublishingWeb" -Url $siteCollection.Url -force

猜你喜欢

转载自www.cnblogs.com/jianyus/p/9182495.html