[转]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.类似列表新建打开方式 ...
随机推荐
- forEach、for+i、map的用法及区别
array.forEach(callback[, thisObject]); 下面是参数的详细信息: 1. callback : 函数测试数组的每个元素. 2.thisObject : 对象作为该 ...
- linux系统df和du命令的区别
发现一台用户的电脑,df检查出来的/磁盘空间占用了16G,比用du查看得到的磁盘空间大的多,du查看/下所有程序目录加起来还不到5G.这是什么原因呢? 即便是有隐藏文件,查了也很小啊. 因为df和 ...
- JVM调优总结:一些概念
数据类型 Java虚拟机中,数据类型可以分为两类:基本类型和引用类型.基本类型的变量保存原始值,即:他代表的值就是数值本身:而引用类型的变量保存引用值.“引用值”代表了某个对象的引用,而不是对象本身, ...
- python 文字转语音包pyttsx安装出错解决方法
pyttsx的python的文字转语音的包,但是pyttsx的官方网站上资源只更新2012年,所以在py3中使用pip install pyttsx或者下载安装包进行安装时,虽然可以安装成功,但是im ...
- CSS浏览器兼容问题集-第三部分
FF与IE 1. Div居中问题 div设置 margin-left, margin-right 为 auto 时已经居中,IE 不行,IE需要设定body居中,首先在父级元素定义text-algin ...
- 【leetcode 简单】第三十一题 买卖股票的最佳时机
给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格. 如果你最多只允许完成一笔交易(即买入和卖出一支股票),设计一个算法来计算你所能获取的最大利润. 注意你不能在买入股票前卖出股票. 示例 ...
- jQuery domready
在jQuery里面,我们可以看到两种写法: $(function(){ //todo }) $(document).ready(function(){ //todo }) 这两个方法的效果都是一样的, ...
- php常用代码段
点击换验证码 <a href=" src="{:U('Reglog/vcode')}" /></a> TP上一条下一条 $prev=$artica ...
- [Leetcode] Sum 系列
Sum 系列题解 Two Sum题解 题目来源:https://leetcode.com/problems/two-sum/description/ Description Given an arra ...
- PXC加入新节点避免SST时grastate.dat文件内容的修改问题
PXC加入新节点避免SST时grastate.dat文件内容的修改问题 在主从同步完成并关闭实例后,需要修改grastate.dat中的seqno:到底应该填已经执行过最后的XID号(Executed ...