none
How to install a webpart contained in a .WSP file via PowerShell ?

    Soru

  • I've got a VS 2010 project with webpart. I need to deploy this project on a multi-server farm which is not possible from VS. So I decided to use a PowerShell script for that task.  But This link on MSDN tells about a .WPP file which is not generated by VS. I'd like to know how to do a webpart installation when it's in a. WSP package?



    15 Haziran 2012 Cuma 13:53

Yanıtlar

  • Hello,

    use this powershell command

    Add-SPSolution pathtoyourproject.wsp

    changing the "pathtoyourproject" with the complete path (something like 'c:\code\SharePointProject2\bin\debug\SharePointProject.wsp');

    once it's done, you can go to the central administration and deploy it or use this command

    Install-SPSolution –Identity SharePointProject.wsp –WebApplication http://webapplicationurl -GACDeployment

    and then you can go to your site and activate the feature containing your webpart or use this command

    Enable-SPFeature FeatureFolderName -Url http://yoursiteurl


    Best regards, Christopher.
    Blog | Mail
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    15 Haziran 2012 Cuma 14:07