SharePoint: Add-Type : Could not load file or assembly "Microsoft.SharePoint.Client.dll"

Siva Sankara Reddy Padala 96 Reputation points
2021-05-12T15:30:17.55+00:00

Getting the below error while running the CSOM PowerShell script

Error: Could not load file or assembly "Microsoft.SharePoint.Client.dll"

PowerShell Version is:

Major Minor Build Revision


5 1 18362 1474

Plese suggest me the solution.

Thanks,
Siva

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-05-13T04:03:47.793+00:00

    Hi @SivaSankaraReddy-5370,

    Make sure you install the SharePoint Online Client Components SDK: https://www.microsoft.com/en-us/download/details.aspx?id=42038

    Or you could install SharePoint Online Management Shell directly and run your csom code there: https://www.microsoft.com/en-us/download/details.aspx?id=35588


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.