Skip to content

Instantly share code, notes, and snippets.

@mirontoli
Last active June 1, 2021 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mirontoli/bcd96fe55af0c5ca28c9b03af012cb7a to your computer and use it in GitHub Desktop.
Save mirontoli/bcd96fe55af0c5ca28c9b03af012cb7a to your computer and use it in GitHub Desktop.
$pnpModule = Get-Module PnP.PowerShell -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1
$pnpModule = Get-Module -ListAvailable PnP.Powershell
$base = $pnpModule.ModuleBase
Connect-PnPOnline $url -Interactive
Add-Type -Path "$base\Framework\Microsoft.SharePoint.Client.dll"
Add-Type -Path "$base\Framework\Microsoft.SharePoint.Client.Runtime.dll"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment