标签:
一般情况下对IT管理者来说,在SharePoint Farm中维护Feature,更喜欢使用命令行实现,这样可以省去登录到具体站点的操作。比如IT接到end user的一个需求,要开启Site Collection Feature,如果直接操作就要登录site collection-> Site Setting找到Feature点击执行enable\disable,要是使用命令行直接输入命令和网站会更快捷。
下面我们就以SharePoint2013为例,看下对于Feature的enable、disable、get、install、uninstall的命令都要怎么执行:
Install-SPFeature-path "Feature Folder Name"
Enable-SPFeature-identity "Feature Name" - URL"Site Collection URL"
Disable-SPFeature -identity"FeatureName" - URL "Site CollectionURL"
Get-SPSite "SiteCollection URL" | Get-SPWeb -Limit ALL |%{Get-SPFeature -Web $_ } | Select DisplayName,ID -Unique
Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq"SITE"}
Uninstall-SPFeature-identity "Feature Folder Name"-force
以上就是关于在SharePoint中对Feature执行Install、Uninstall、Enable、Disable和Get的命令,感谢阅读!
标签:
原文地址:http://blog.csdn.net/warmsunshine7/article/details/50982533