SharePoint Online Management Sell conflicts with Share Point Online Client Component SDK

Viewed 1629

My PC has both Share Point Online Client Component SDK and SharePoint Online Management Shell(16.0.20414.12000) installed. When trying to execute command Connect-SPOService -Url $SpSiteURL it gives below error.

The term 'Connect-SPOService' is not recognized as the name of a cmdlet

When trying to import the module Microsoft.Online.SharePoint.PowerShell, it gives below error

Could not load type 'Microsoft.SharePoint.Client.Publishing.PortalLaunch.PortalLaunchRedirectionType' from assembly 'Microsoft.SharePoint.Client.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

I found a few internet resources asking to uninstall Share Point Online Client Component SDK to resolve this issue,however this is not a possible solution, since I need both for different scenarios.

How can I resolve this issue?

Thanks in advance.

1 Answers

I have a similar issue when trying to run these scripts on an on-premise SharePoint 2013 machine which has a different set off DLLs in the GAC. I don't want to break my SharePoint 2013 setup by removing the GAC versions …

My solution was to run the scripts on a non SharePoint installed machine.

Related