upload wsp in office 365 using Powershell + CSOM



Posted on August 24th, 2014

In this post you will learn how to upload wsp in office 365 using Powershell + CSOM capabilities.

If you are working for first time with Powershell + CSOM in office 365, please check Chris O'Brien @ChrisO_Brien)  blog post here.

Prerequisites:

I have created a folder called scripts and placed the required SharePoint client dlls.

Below are the list of dlls i need for execution of script.

  • Microsoft.SharePoint.Client.dll
  • Microsoft.SharePoint.Client.Runtime.dll
  • Microsoft.Online.SharePoint.Client.Tenant.dll

I created an xml file where i can specify the site collection url and wsp names. You can see the structure below. You can add the wsp files you want or remove while running the script.

For solutions i created a folder and placed inside that. You can see the below figure of my folder structure.

Powershell script:

To upload the WSP to Solution gallery i am using FileCreationInformation class.


Conclusion:

In this post we have seen how to upload wsp solutions in office 365 using Powershell and CSOM.


› upload wsp in office 365 using Powershell



Join 6,500 subscribers and receive instant access to

Devendra's Library of Resources for SharePoint Developers

About Author

Devendra Velegandla is a four-time recipient of Microsoft's Most Valuable Professional (MVP) award (2014-2017) for Office Servers and Services MVP and  SharePoint Server. He received the MCC award for his contributions in Microsoft MSDN/TechNet forums. He loves sharing articles, videos, and tutorial on SharePoint and Office 365.