部署、收回和删除解决方式----STSADM和PowerShell
2016-01-03 20:40
567 查看
部署、收回和删除解决方式----STSADM和PowerShell
由于近期总是要部署wsp解决方式,所以常常要用到命令行或者PowerShell。所以有必要将命令集中放在这里。在部署的时候可以高速的參考。STSADM
stsadm -o addsolution –filename c:\bin\CustomerSiteSearch.wsp stsadm -o deploysolution –name CustomerSiteSearch.wsp -url http://[ServerName] -allowgacdeployment -force –immediate stsadm -o activatefeature –name customersitesearch -url http://[ServerName] -force stsadm -o retractsolution -name solutionName.wsp -immediate stsadm -o deletesolution -name solutionName.wsp
PowerShell
Add-SPSolution c:\bin\CustomerSiteSearch.wsp Install-SPSolution -Identity CustomerSiteSearch.wsp -AllWebApplications -GACDeployment Enable-SPFeature CustomerSiteSearch_feature1 -url http://[ServerName]/ –force Uninstall-SPSolution -identity solutionName.wsp Remove-SPSolution -identity solutionName.wsp
关于PowerShell:
STSADM命令对于SharePoint 2010仍然实用,可是官方不赞成了。PowerShell取而代之。
PowerShell能够做到STSADM能做到的全部事情,并且很多其它,也更快。
PowerShell命令大写和小写不敏感。
和STSADM一样。PowerShell必须执行在SharePoint Server上。
PowerShell必须使用管理员身份执行。
相关文章推荐
- 【Shell脚本学习25】Shell文件包含
- 【Shell脚本学习24】Shell输入输出重定向:Shell Here Document,/dev/null文件
- 【Shell脚本学习23】Shell函数参数
- 【Shell脚本学习22】Shell 函数:Shell函数返回值、删除函数、在终端调用函数
- 【Shell脚本学习21】Shell break和continue命令
- 【Shell脚本学习20】Shell until循环
- 【Shell脚本学习19】Shell while循环
- 【Shell脚本学习18】Shell for循环
- 【Shell脚本学习17】Shell case esac语句
- 【Shell脚本学习16】Shell if else语句
- 【Shell脚本学习15】shell printf命令:格式化输出语句
- 【Shell脚本学习14】Shell echo命令
- 【Shell脚本学习13】Shell数组:shell数组的定义、数组长度
- 【Shell脚本学习12】Shell字符串
- 【Shell脚本学习11】Shell注释
- 【Shell脚本学习10】Shell运算符:Shell算数运算符、关系运算符、布尔运算符、字符串运算符等
- 【Shell脚本学习9】Shell替换:Shell变量替换,命令替换,转义字符
- 【Shell脚本学习8】Shell特殊变量:Shell $0, $#, $*, $@, $?, $$和命令行参数
- 【Shell脚本学习7】Shell脚本学习指南分享
- 【Shell脚本学习6】Shell变量:Shell变量的定义、删除变量、只读变量、变量类型