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

Siva Sankara Reddy Padala 96 Reputation points

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.


A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,280 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,021 Reputation points

    Hi @SivaSankaraReddy-5370,

    Make sure you install the SharePoint Online Client Components SDK:

    Or you could install SharePoint Online Management Shell directly and run your csom code there:

    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.