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);
}
分享到:
相关推荐
一方面, 在javascript领域掀起了一场革命,另一方面, 最近推出了最初的开源,跨平台版本,并将它们连接在一起,使您能够无论您是程序员,IT还是DevOps员工,都可以创建要求您提供的任何解决方案。安装$ npm i -S ...
1 Key Deploy SharePoint Solutions
该解决方案包含一个PowerShell命令库,该命令库使您可以对SharePoint执行复杂的配置和工件管理操作。 这些命令在后台使用CSOM和REST的组合,并且可以与SharePoint Online一起作为SharePoint内部部署。 我发现了一个...
us-17-Dods-Infecting-The-Enterprise-Abusing-Office365-Powershell-For-Covert-C2
us-17-Bohannon-Revoke-Obfuscation-PowerShell-Obfuscation-Detection-And Evasion-Using-Science-wp
Bohannon-Revoke-Obfuscation-PowerShell-Obfuscation-Detection-And Evasion-Using-Science-wp
The Command Line Crash Course--- PowerShell速成教程,国外网站上收集整理,方便阅读
WindowsServer2003-KB926140-v5-x86-CHS-powershell
藏经阁-Infecting-The-Enterprise-Abusing-Office365-Powershell-For-Covert-C2
Dods-Infecting-The-Enterprise-Abusing-Office365-Powershell-For-Covert-C2
Tableau-Powershell-Scripts-master.rar
vscode-powershell, 为 Visual Studio 代码提供PowerShell语言和调试支持 用于 Visual Studio 代码的语言支持 这里扩展为 Visual Studio 代码提供了丰富的PowerShell语言支持。 现在你可以使用 Visual Studio 代码...
AspNetCore.Health使负载平衡器能够监视已部署的Web应用程序的状态 -C#-PowerShell-下载
2020.04-远控免杀从入门到实践(6)-代码篇-Powershell1
awesome-powershell:令人愉悦的PowerShell模块和资源的精选列表
适用于PowerShell的Splunk加载项 适用于PowerShell的Splunk加载项为PowerShell事件日志提供了字段提取。 不幸的是,PowerShell日志使用系统语言,这要求每种语言都进行字段提取。 此外,定界符有时是: ,有时是= 。 ...
PowerShell-7.2.6-win-x64 Windows PowerShell 是一种命令行外壳程序和脚本环境,使命令行用户和脚本编写者可以利用 .NET Framework的强大功能。
主要介绍了python通过ssh-powershell监控windows的方法,涉及Python操作ssh-powershell的相关技巧,需要的朋友可以参考下
Azure PowerShell 提供一组可以使用 Azure 资源管理器模型管理 Azure ... Azure PowerShell 使用了 .NET Standard,这使得它可用于 Windows、macOS 和 Linux。 还可以在 Azure Cloud Shell 中使用 Azure PowerShell。