[转]SharePoint 2010 Powershell Feature Cmdlets
In this installment its time to look at the various cmdlets that have to do with Features. Of course you can look at the UI to do this but its much, much easier to do this powershell and dare I say more fun.
Now keep in mind that this only related to FARM level features, I will cover Sandbox solutions and features next!
Listing features on Farm, Site Collection and Site
The main cmdlet used within powershell to list features is the Get-SPFeature cmdlets. To show all the features on the farm listed by display name and sorted use this:
1 |
Get-SPFeature | Sort -Property DisplayName |

To show all the features on the Farm grouped by scope in a table use:
1 |
Get-SPFeature | Sort -Property DisplayName, Scope | FT -GroupBy Scope DisplayName |
To see all features for a Web Application:
1 |
Get-SPFeature -WebApplication http://webapplication |
To see all features for a Site Collection:
1 |
Get-SPFeature -Site http://sitecollection |
To see all features for a Site:
1 |
Get-SPFeature -Web http://siteurl |
Remember for some more information relating to the features you can use:
1 |
Get-SPFeature -Web http://siteurl | Format-List |
To see all the members that a feature definition has use:
1 |
Get-SPFeature -Web http://siteurl | Get-Member |

Enabling and Disabling Features
To disable and enable features is all pretty easy once again using the Disable-SPFeature and Enable-SPFeature cmdlets but there is a trick. You need the name of the feature folder that contains the actual feature not what is displayed in the UI so be careful:
1 |
Enable-SPFeature -Identity "Hold" -URL http://url |
You can apply this to any Site and Site Collection scoped features.
Obviously to disable a feature just use the same syntax but with the Disable-Feature cmdlet
1 |
Disable-SPFeature -Identity "Hold" -URL http://url |
Remember though that the -Identity is the DisplayName property of the feature, not the text displayed on the UI which is actually retrieved from a resources file.
For example the Document Sets feature looks like below in the SharePoint interface:
But to actually enable it you have to use the following cmdlet:
1 |
Enable-SPFeature -Identity DocumentSet -URL http://url |
Installing and Uninstalling Features
1 |
Install-SPFeature "FeatureFolderName" |
To uninstall simply use the same Uninstall-Feature command with the same parameters:
1 |
UnInstall-SPFeature "FeatureFolderName" |
[转]SharePoint 2010 Powershell Feature Cmdlets的更多相关文章
- SharePoint 2010 PowerShell 系列 之 备份、还原、部署 .WSP
转:http://www.cnblogs.com/Fengger/archive/2012/08/24/2654093.html PowerShell系列目录 最近在部署测试环境,就顺便把PowerS ...
- sharepoint 2010 powershell
可参看云总的博客:http://blog.csdn.net/yun_liang1028/article/details/6419729
- SharePoint 2010 最佳实践学习总结------第2章 SharePoint Windows PowerShell指南
第2章 SharePoint Windows PowerShell指南 SharePoint 2010是SharePoint系列产品中第一个开始支持Windows PowerShell的产品,在以前的 ...
- Feature Stapling in SharePoint 2010
http://msdn.microsoft.com/en-us/library/bb861862(v=office.12).aspx http://gallery.technet.microsoft. ...
- SharePoint solution and feature management with PowerShell
/* Author: Jiangong SUN */ Hello, I want to introduce SharePoint solution and feature management usi ...
- [SharePoint 2010] SharePoint 2010 部署、收回和删除解决方案----STSADM和PowerShell
STSADM stsadm -o addsolution –filename c:\bin\CustomerSiteSearch.wsp stsadm -o deploysolution –name ...
- SharePoint 2010: Change welcome page on PowerShell
摘要: SharePoint 2010之后呢, 建立一个 Team Site会有两个 default page, 分别是 Sitepages/home.aspx and default.aspx. 这 ...
- 通过PowerShell卸载全部的SharePoint 2010 解决方式
通过PowerShell卸载全部的SharePoint 2010 解决方式 为了演示.我常常须要拆毁再重建SharePoint 2010 环境. 我常常须要用到的操作就 ...
- SharePoint 2010 常用技巧及方法总结
1.代码调试确定进程cd c:\windows\system32\inetsrvappcmd list wppause注:保存成批处理文件,查看进程.bat,用的时候双击即可 2.类似列表新建打开方式 ...
随机推荐
- Spring整合JMS(一)——基于ActiveMQ实现 (转)
*注:别人那复制来的 1.1 JMS简介 JMS的全称是Java Message Service,即Java消 息服务.它主要用于在生产者和消费者之间进行消息传递,生产者负责产生消息,而消费者 ...
- 2017北京国庆刷题Day7 morning
期望得分:100+0+100=200 实际得分:100+20+0=120 离散化搞搞 #include<cstdio> #include<iostream> #include& ...
- (3.1)用ictclas4j进行中文分词,并去除停用词
酒店评论情感分析系统——用ictclas4j进行中文分词,并去除停用词 ictclas4j是中科院计算所开发的中文分词工具ICTCLAS的Java版本,因其分词准确率较高,而备受青睐. 注:ictcl ...
- PhotoSwipe 图片浏览插件使用方法
一.简介 PhotoSwipe 是专为移动触摸设备设计的相册/画廊.兼容所有iPhone.iPad.黑莓6+,以及桌面浏览器.底层实现基于HTML/CSS/JavaScript,是一款免费开源的相册产 ...
- 你不知道的Static
Static静态字段,静态方法,静态代码块 壹 简介 一些场景下会要求一个类的多个实例共享一个成员变量:有时候想定义一些不和具体对象关联.不需要new就调用的方法 举例:Console类的Write ...
- Islands and Bridges(POJ2288+状压dp+Hamilton 回路)
题目链接:http://poj.org/problem?id=2288 题目: 题意:求Hamilton 路径权值的最大值,且求出有多少条权值这么大的Hamilton路径. 思路:状压dp,dp[i] ...
- sg函数&&子状态的讨论
题目链接:https://cn.vjudge.net/contest/269933#problem/H 具体思路:首先,这是一个公平的比赛,并且是两个人参与,两个人都足够聪明,并且可以通过有限步结束比 ...
- Struts2使用
Struts2是一个基于MVC设计模式的Web应用框架.在MVC设计模式中,Struts2作为控制器(Controller)来建立模型与视图的数据交互.Struts 2是Struts的下一代产品,是在 ...
- GitHub vs GitLab:它们有什么区别?
查看原文GitLab vs. GitHub: How Are They Different? 两者都是基于web的Git repositories(仓库),拥有流水线型的web开发流程,它们为开发团队 ...
- 自己实现的SVM源码
首先是DATA类 import java.awt.print.Printable; import java.io.File; import java.io.FileNotFoundException; ...