jeudi 10 mars 2011

Utiliser Power Shell pour deployer les solutions SharePoint 2010

Un moyen tres simple pour deployer des solutions SharePoint c'est d'exploiter la puissance du PowerShell

Commandes
PowerShell
 Add solution
Add-SPSolution c:\code\SharePointProject\bin\debug\MonProjetSP.wsp

Install –> Deploys,
Install-SPSolution –Identity MonProjetSP.wsp –WebApplication http://sitecollection/ –GACDeployment



Mise a jour de la solution
Update-SPSolution –Identity MonProjetSP.wsp –LiteralPath c:\code\SharePointProject\bin\debug\MonProjetSP.wsp –GACDeployment

Uninstall –> Retracts
Uninstall-SPSolution –Identity MonProjetSP.wsp –WebApplication http://sitecollection/
Remove-SPSolution –Identity MonProjetSP.wsp




Pour faire des scripts des commandes powershell, on peut utiliser ISE power Shell qui se trouve dans : C:\Windows\System32\WindowsPowerShell\v1.0, il faudrait juste installer la feature windows correspondante : Windows Power Shell integrating scripting environement ISE

Le reste des commande PowerShell se trouve sur le site microsoft