I am trying to connect to SharePoint with Powershell Connect-SPOService But I get the error:
| Could not load type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' from assembly
| 'Microsoft.SharePoint.Client.Runtime, Version=16.1.0.0, Culture=neutral,
| PublicKeyToken=71e9bce111e9429c'.
I reinstalled Microsoft.Online.SharePoint.PowerShell and import it. But still. I also have PnP.PowerShell installed. can that be the issue?
This is due to DLL Version mismatch. To resolve the issue, follow these steps:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL
, Remove all Folders starting with name: Microsoft.SharePoint*
Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell
and reinstall the module Install-Module -Name Microsoft.Online.SharePoint.PowerShell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With