1

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

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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