I am running CSOM code in PowerShell to access data of SharePoint 2013 sites. I am adding below lines to load the DLLs in my machine. These lines expect these DLLs to be present in this location.

Add-Type –Path "C:\Microsoft.SharePoint.Client.dll"
Add-Type –Path "C:\Microsoft.SharePoint.Client.Runtime.dll"

If i have to run the same script from other server, how i can ensure these DLLs will be present in that location as we cant download and save these in C:\ path every time. Is there any way that these will be accessed from some CDN or online link?

Download proper version and install in your target server.

  • Then how to refer that in our script? – Adarsh Awasthi Dec 5 at 8:51
  • Default install path C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15 or 16\ISAPI – Lee_MSFT Dec 5 at 9:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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