SharePoint 2016: How to setup Development Environment for CSOM based PowerShell Development

Since the evolution of PowerShell Development framework that can be used in conjunction with CSOM API of SharePoint. This type of development could be relatively more useful in scenarios where we do not have direct access to SharePoint Server and only client machines are accessible.

In this article we will explore the steps that can be helpful in setting up the client machines for PowerShell development.

Following are the steps that we can follow to setup the client machines:

Step 1: Download Windows Management Framework 3.0

  • Visit the following URL

https://www.microsoft.com/en-us/download/details.aspx?id=34595

  • Click on download1
  • Select “Windows6.1-KB2506143-x64.msu” file to download
  • Click Next

2

  • Save the downloaded file to the local folder.

3

Step 2: Install Windows Management Framework 3.0

  • Run the Exe File “Windows6.1-KB2506143-x64.msu”

4

Wait till the installer has been completed

5

Step 3: Copy SharePoint CSOM DLLs

Add all the SharePoint CSOM DLLs from any SharePoint System to the local folder

6

Step 4: Add the DLL references

Add reference to the required SharePoint DLLs to the PowerShell Code

At the bare minimum we need to add the reference of the following two DLLs:

  • Microsoft.SharePoint.Client.dll
  • Microsoft.SharePoint.Client.Runtime.dll

7

Step 5: Perform Configuration Test

  • Write PowerShell Code targeting SharePoint On-Premise Site

8

  • Run PowerShell Script

9

And sure enough we will get the output of the PowerShell Commands.

10

The successful execution of the script proves that we have done the configuration correctly.

Hope you find it helpful.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s