1. 添加解决方案到SharePoint场

Add-SPSolution "c:\newsolution.wsp"

2. 获取场中的解决方案

Get-SPSolution

3. 获取指定的解决方案

$solution = Get-SPSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd

4. 部署解决方案到Web应用程序

$solution = Get-SPSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Install-SPSolution $solution –WebApplication "SharePoint – 80"
–Force -GACDeployment

5. 收回解决方案

从一个Web应用程序收回

$solution = Get-SPSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Uninstall-SPSolution $solution –WebApplication "SharePoint – 80"

从所有Web应用程序收回

$solution = Get-SPSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Uninstall-SPSolution $solution –AllWebApplications

收回全局部署的解决方案

$solution = Get-SPSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Uninstall-SPSolution $solution

6. 更新解决方案

$solution = Get-SPSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Update-SPSolution $solution –LiteralPath "c:\newsolution.wsp" –Force
-GACDeployment

7. 从场中移除解决方案

$solution = Get-SPSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Remove-SPSolution $solution

8. 向网站集中添加沙盒解决方案

Add-SPUserSolution –LiteralPath "c:\SBSolution.wsp" –Site
"http://intranet.sp2010.com/sites/UserSC"

9. 获取网站集中所有可用的沙盒解决方案

Get-SPUserSolution –site http://intranet.sp2010.com/sites/UserSC

10. 获取指定的沙盒解决方案

$userSolution = Get-SPUserSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
–site http://intranet.sp2010.com/sites/UserSC

11. 激活沙盒解决方案

$userSolution = Get-SPUserSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Install-SPUserSolution $userSolution –Site
"http://intranet.sp2010.com/sites/UserSC"

12. 反激活沙盒解决方案

$userSolution = Get-SPUserSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Uninstall-SPUserSolution $userSolution –Site
"http://intranet.sp2010.com/sites/UserSC"

13. 更新沙盒解决方案

Add-SPUserSolution –LiteralPath "c:\SBSolution2.wsp"
–Site "http://intranet.sp2010.com/sites/UserSC"
$userSolution = Get-SPUserSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Update-SPUserSolution $userSolution
–site "http://intranet.sp2010.com/sites/UserSC"
–ToSolution SBSolution2

14. 移除沙盒解决方案

$userSolution = Get-SPUserSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Remove-SPUserSolution $userSolution
–site http://intranet.sp2010.com/sites/UserSC

15. 显示场中的功能

Get-SPFeature –Farm

16. 显示Web应用程序中的功能

Get-SPFeature –WebApplication "SharePoint – 80"

17. 显示网站集中的功能

Get-SPFeature –Site http://sp2010

18. 显示网站中的功能

Get-SPFeature –Web http://sp2010

19. 获取指定的功能

$feature = Get-SPFeature
-Identity e8389ec7-70fd-4179-a1c4-6fcb4342d7a0

20. 激活功能

$feature = Get-SPFeature
-Identity e8389ec7-70fd-4179-a1c4-6fcb4342d7a0
Enable-SPFeature $feature –Url "http://sp2010" -Force

21. 反激活功能

$feature = Get-SPFeature
-Identity e8389ec7-70fd-4179-a1c4-6fcb4342d7a0
Disable-SPFeature $feature –Url "http://sp2010" -Force

22. 安装功能

Install-SPFeature –Path "CustomFeature" -Force

23. 卸载功能

$feature = Get-SPFeature
-Identity e8389ec7-70fd-4179-a1c4-6fcb4342d7a0
Uninstall-SPFeature $feature -Force

24. 导出场中安装的解决方案

[Void][System.Reflection.Assembly]::LoadWithPartialName(
"Microsoft.SharePoint")
[Void][System.Reflection.Assembly]::LoadWithPartialName(
"Microsoft.SharePoint.Administration")
$spFarm = [Microsoft.SharePoint.Administration.SPFarm]::Local
$spFarmSolutions = $spFarm.Solutions
$localPath = "C:\Solutions\"
foreach($spFarmSolution in $spFarmSolutions)
{
[string]$outputFileName = $localPath + $spFarmSolution.Name
$spFarmSolution.SolutionFile.SaveAs($outputFileName);
}

SharePoint 解决方案和功能-PowerShell的更多相关文章

  1. Sharepoint 开启发布功能的PowerShell

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

  2. [SharePoint 2010] SharePoint 2010 部署、收回和删除解决方案----STSADM和PowerShell

    STSADM stsadm -o addsolution –filename c:\bin\CustomerSiteSearch.wsp stsadm -o deploysolution –name ...

  3. SharePoint 解决方案手动打包简单介绍

    介绍:在使用SharePoint中,我们经常需要做的就是打包解决方案,我们来介绍下SharePoint解决方案的手动部署,我自己觉得,解决方案是SharePoint中非常好的一个功能,部署和使用起来相 ...

  4. 在SharePoint解决方案中使用JavaScript (2) – 模块化

    本文是在SharePoint中使用JavaScript的第二篇文章,前面的文章包括: 在SharePoint解决方案中使用JavaScript (0) 在SharePoint解决方案中使用JavaSc ...

  5. 在SharePoint解决方案中使用JavaScript (1) – 引用.js文件

    本文是系列文章的第一篇. 在SharePoint解决方案中使用JavaScript (0) 作为在SharePoint应用程序中使用JavaScript的第一步,就是要知道如何将一个写好的.js文件, ...

  6. 在SharePoint解决方案中使用JavaScript (0)

    随着Web前段技术(JavaScript/HTML5)的日益发扬光大,在Web应用程序中,我们开始更多的使用JavaScript.很多以往是放在服务器上运行的逻辑,现在都开始逐渐的向前段转移.这种趋势 ...

  7. DYN-B201 Dynamics CRM 云生产力解决方案与功能简介

    DYN-B201 Dynamics CRM 云生产力解决方案与功能简介 讲师:王健.林松涛Dynamics CRM 云产品正式落地中国,CRM 与 Azure.O365 深度整合无缝集成,带来无与伦比 ...

  8. 系统升级日记(3)- 升级SharePoint解决方案和Infopath

    最近一段时间在公司忙于将各类系统进行升级,其最主要的目标有两个,一个是将TFS2010升级到TFS2013,另外一个是将SharePoint 2010升级到SharePoint 2013.本记录旨在记 ...

  9. Sharepoint 2013 发布功能(Publishing features)

    一.默认情况下,在创建网站集时,只有选择的模板为‘ Publishing Portal(发布门户)’与‘ Enterprise Wiki(企业 Wiki)’时才默认启用发布功能,如下图所示: 二.发布 ...

随机推荐

  1. mysql删除sql表添加别名及删除sql的注意事项

    本文为博主原创,未经允许不得转载: 根据平常的习惯,个人会将操作的表后面添加一个别名,无论是使用还是不使用的时候,均是为了 修改还是扩展sql的时候更加安全,方便,快捷. 今天在写删除的sql时,对表 ...

  2. layer.alert自定义关闭回调事件

    在项目应用中,遇到自定义关闭layer.alert弹出层,即在关闭layer.alert时,可以自动触发关闭时的事件, 具体方法为: layer.alert('爱心提示!', function(){ ...

  3. 前端验证用户登陆状态(vue.js)

    首先用户需要进行登陆(请求登陆接口),接口请求成功之后后台会返回对应的用户信息(可以把用户信息存放在浏览器缓存中),并且后台会设置浏览器的cookie值(可以在network->header-& ...

  4. Json多层嵌套,要怎么提取?

    一直用Jmeter的Json Extactor,对于多层的Json嵌套,很好用,自己写代码的时候,总是遇到各种Exception 看了网上的资料,整理一下 1. 最简单的JSON提取,只有一层的时候 ...

  5. YOLO V2论文理解

    概述 YOLO(You Only Look Once: Unified, Real-Time Object Detection)从v1版本进化到了v2版本,作者在darknet主页先行一步放出源代码, ...

  6. 【Golang】 可以自动生成测试用例的库--gotests

    简介 gotests是一个Golang命令行工具,它可以使编写Go的测试代码变得容易.它能基于目标源文件的函数和方法生成数据驱动测试用例,并且在此过程会自动导入任何依赖. 下面是gotests在使用S ...

  7. Unity生成屏幕快照

    public static Texture2D CaptureCamera(Camera camera, Rect rect) { RenderTexture rt = ); RenderTextur ...

  8. SVN同步版本库与网站目录2

    定义: SVN版本库  = /home/svn/repos  网站目录     = /var/www/web 1.检出一个项目到网站目录 #svn checkout file:///home/svn/ ...

  9. python-GUI,生成ssn

    第一次做这个, 样子有点丑,主要是实现功能,做测试的时候,经常要用到身份证号.手机号.姓名等,这里先生成ssn,后续研究怎么做成客户端 代码: from tkinter import * from u ...

  10. 20170503xlVBA房地产数据分类连接

    Sub NextSeven_CodeFrame4() Application.ScreenUpdating = False Application.DisplayAlerts = False Appl ...