Setting up PowerShell for SPO

The very first thing you want to do is to get the required SharepointClient dlls.

You have the option of either getting them from the Sharepoint Online Management Shell install folder with the caveat that you will have a limited number of dlls to interact with Sharepoint.

If you want to go for the dev version( and all the dlls you can use), you can download the Sharepoint CSOM dlls from either

  1. Nuget

https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/16.1.6906.1200

2. Sharepoint Online CSOM official page

https://www.microsoft.com/en-us/download/details.aspx?id=42038&fa43d42b-25b5-4a42-fe9b-1634f450f5ee=True&e6b34bbe-475b-1abd-2c51-b5034bcdd6d2=True&751be11f-ede8-5a0c-058c-2ee190a24fa6=True

The difference between the two is that the Nuget version is more frequently updated than the official page so you will benefit from the most recent available methods

Note:

if you download the nuget package (recommended as is more recent) , rename the file from .nupkg to .zip, enter the archive and retrieve the dlls under

\microsoft.sharepointonline.csom.16.1.6906.1200.zip\lib\net45

Save them under C:\tools\

You are done!