Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Can i deploy a wsp using powershell batch file without logging to the sp server ?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Have you tried the Remote PowerShell ability. Powershell 2.0 uses the concepts of WIN-RM which involves piping the contents of the remote call and running it on the remote server.

You need to setup the remote Computer 1st

  • you need to run the following command on your server Enable-PSRemoting
  • you need to let powershell know that your server machine or remote machine will act as the server. Enable-WSmanCredSSP -Role Server

Now Setup the Client Computer:

  • edit group policy on your client computer to all credential delegation
  • run the following command Enable-PSRemoting
  • enable WSMan CredSSP with the following command Enable-WSManCredSSP -Role Client –DelegateComputer “NameOfServer”

Now you can your powershell remotely. check the complete details over here

There is another possible way is with the SPFarm.Open method, as long as you have access to the database.

string connString = txtConnectionString.Text;

SPFarm remoteFarm = SPFarm.Open(connString);

remoteFarm.Solutions.Add(txtWSPPath.Text);

check this link as well.

http://gallery.technet.microsoft.com/office/Sharepoint-Remote-Deploy-e5603f68

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.