欧非资源网:安全、免费、专业放心的资源下载站! 最新软件|软件分类

您的位置:欧非资源网 > 其他专区 > SharePoint > 如何利用命令行管理SharePoint Feature?

如何利用命令行管理SharePoint Feature?

时间:2020-09-08 09:45作者:admin来源:未知人气:276我要评论(0)

一般情况下对IT管理者来说,在SharePoint Farm中维护Feature,更喜欢使用命令行实现,这样可以省去登录到具体站点的操作。比如IT接到end user的一个需求,要开启Site Collection Feature,如果直接操作就要登录site collection-> Site Setting找到Feature点击执行enabledisable,要是使用命令行直接输入命令和网站会更快捷。

下面我们就以SharePoint 2013为例,看下对于Feature的enable、disable、get、install、uninstall的命令都要怎么执行:

  • Install Feature
  1. 登录SharePoint Server,将build好的Feature先copy到SharePoint安装目录"…Program FilesCommon Filesmicrosoft sharedWeb Server Extensions15TEMPLATEFEATURES";

如何利用命令行管理SharePoint Feature?

  1. Administrator方式打开SharePoint 2013 Management Shell,输入命令并执行;

Install-SPFeature-path "Feature Folder Name"

如何利用命令行管理SharePoint Feature?

  1. 此时登录一个site collection,Site Settings-> Site Features,可以看到install的Feature,默认是disable状态。

如何利用命令行管理SharePoint Feature?

  • Enable Feature
  1. 仍然是Administrator方式打开SharePoint2013 Management Shell,输入命令并执行;

Enable-SPFeature-identity "Feature Name" - URL"Site Collection URL"

如何利用命令行管理SharePoint Feature?

  1. 登录到Site Collection,Site Settings中查看Feature情况,成功被启用。

如何利用命令行管理SharePoint Feature?

  • Disable Feature
  1. Administrator方式打开SharePoint2013 Management Shell,输入命令并执行,在弹出的确认执行对话中输入"Y"执行;

Disable-SPFeature -identity"FeatureName" - URL "Site CollectionURL"

如何利用命令行管理SharePoint Feature?

  1. 登录到Site Collection,Site Settings中查看Feature情况,成功被禁用。

如何利用命令行管理SharePoint Feature?

  • Get Feature
  1. Administrator方式打开SharePoint2013 Management Shell,输入命令并执行,可以查询到当前site下所有的Feature。

Get-SPSite "SiteCollection URL" | Get-SPWeb -Limit ALL |%{Get-SPFeature -Web $_ } | Select DisplayName,ID -Unique

如何利用命令行管理SharePoint Feature?

  1. 在SharePoint2013 Management Shell中输入下面命令可以知道部署到Site中的Feature都有哪些。

Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq"SITE"}

如何利用命令行管理SharePoint Feature?

  • Uninstall Feature
  1. Administrator方式打开SharePoint2013 Management Shell输入命令行,在弹出确认提示中输入"Y",并执行;

Uninstall-SPFeature-identity "Feature Folder Name"-force

如何利用命令行管理SharePoint Feature?

  1. 登录SharePoint网站,查看Feature情况,已经被成功卸载。

如何利用命令行管理SharePoint Feature?

 

以上就是关于在SharePoint中对Feature执行Install、Uninstall、Enable、Disable和Get的命令,感谢阅读!

相关阅读 SharePoint中Office文件无法打开的解决方案如何快速生成SharePoint测试大文件如何查询SharePoint Library中空文件夹?如何快速备份SharePoint Farm Solution如何解决Event Viewer中SharePoint Error - Event ID 8321SharePoint 2016 CU安装失败,"Exception: The upgraded database schema doesn't match the TargetSchema"的解决方案InfoPath Error “此文档库已经被重命名或删除,或者网络问题导致文件无法保存…” 的解决方案SharePoint 2013 App概述How to Shrink SharePoint Content Database Log File?Project Web App Feature无法开启的解决方案

文章评论
发表评论

热门文章 SharePoint 2016 图文安装教程 后面有激活序列号、密钥分享[SharePoint入门教程]一SharePoint发展、工具及术语如何用 SharePoint Online创建团队网站?SharePoint Iframe 报错“此内容不能显示在一个框架中”

最新文章 SharePoint中Office文件无法打开的解决方案如何快速生成SharePoint测试大文件 如何查询SharePoint Library中空文件夹?如何快速备份SharePoint Farm Solution如何解决Event Viewer中SharePoint Error - Event ID 8321SharePoint 2016 CU安装失败,"Exception: The upgraded database s

人气排行 SharePoint 2016 图文安装教程 后面有激活序列号、密钥分享[SharePoint入门教程]一SharePoint发展、工具及术语如何用 SharePoint Online创建团队网站?SharePoint Iframe 报错“此内容不能显示在一个框架中”SharePoint 2013 安装图解 SharePoint安装步骤图解教程SharePoint 如何开启访问请求[SharePoint入门教程]一SharePoint概述[SharePoint入门教程]一创建SharePoint母版页

盖楼回复X

(您的评论需要经过审核才能显示)