Skip to content

Instantly share code, notes, and snippets.

@OlafD
Created August 2, 2020 11:32
Show Gist options
  • Save OlafD/f6a297df5ddc2db76044e487088b6b9e to your computer and use it in GitHub Desktop.
Save OlafD/f6a297df5ddc2db76044e487088b6b9e to your computer and use it in GitHub Desktop.
Load SharePoint Online CSOM libraries from path, where PowerShell PnP extensions are installed. The module folder contains all CSOM libraries for SharePoint Online.
$pnpModulePath = (Get-Module -Name SharePointPnPPowerShellOnline).Path
Add-Type -Path "$pnpModulePath\Microsoft.SharePoint.Client.dll"
Add-Type -Path "$pnpModulePath\Microsoft.SharePoint.Client.Runtime.dll"
Add-Type -Path "$pnpModulePath\Microsoft.SharePoint.Client.WorkflowServices.dll"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment