Forum Discussion
Using PnP PowerShell On Premises and Online
Okay, I figured out that I need to target the SharePointPnPPowerShell[2013|2016|Online].psd1 file and not the .DLL. That solves the main issue above. I also found the -DisableNameChecking parameter which got rid of the "verb" warning.
HOWEVER...
When I try running agaist 2016 on premises, Connect-PnPOnline complains:
Connect-PnPOnline : Method not found: 'Void Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryRetry(Microsoft.SharePoint.Client.ClientRuntimeContext, Int32, Int32)'.
Is there some issue with ExecuteQueryRetry in the 2016 version of the library? I have the exact same script running against my SP Online site and it works perfectly.
I have triple checked that the correct 2016 module is the only one loaded. I really need to be able to use this against an On Prem installation, so any insight will be welcome.
Thanks in advance.
I faced the same issue and downloaded Mar release from https://github.com/SharePoint/PnP-PowerShell/releases. it worked..