1

I am currently trying out the Hybrid Search of SharePoint (2019) and am facing issues when trying to import 'Microsoft.Online.SharePoint.PowerShell'. I get the following message:

PS C:\Users\username> Import-Module Microsoft.Online.SharePoint.PowerShell -force

Import-Module : 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'. At line:1 char:1 Import-Module Microsoft.Online.SharePoint.PowerShell -force CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

Installing via Install-Module Microsoft.Online.SharePoint.PowerShell -force works without an error. Also, installing and importing other modules (e.g. Import-Module MSOnline -force or Import-Module MSOnlineExt -force) works fine.

When checking for the installed version I see the following:

PS C:\Users\username> Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version

Microsoft.Online.SharePoint.PowerShell 16.0.20616.12000

I have checked for any installed programs, but besides the SharePoint Server 2019 itself and the SharePoint Hybrid Configuration Wizard there is nothing else on that machine (in regards to SharePoint or other products like Exchange etc.).

I found a few forum posts and articles suggesting to manually remove Microsoft.SharePoint.Client folders from GAC which I think might not be the best choice in the end ;)

Any help is highly apprectiated.

1 Answer 1

1

You don't need the SPO cmdlets to enable Hybrid Search. See the instructions at Connect your cloud Search service application to your Microsoft 365 organization.

The SPO cmdlets will conflict with the built-in CSOM binaries deployed as part of the SharePoint Server install.

2
  • Thanks for the quick reply. I initially found a video / guide from Microsoft for configuring hybrid solutions and in that guide under 'Configure server-to-server authentication from SharePoint Server to SharePoint in Microsoft 365' SPO cmdlets are being listed as a requirement. Seems I got something wrong. Thanks for the link - I'll try it now! +1
    – AM2FTW
    Commented Nov 17, 2020 at 7:25
  • Now running into the error "Failed to call PreparePushTenant, error was Exception calling "ExecuteQuery" with "0" argument(s): "Internal Server Error" " while executing the OnBoard-CloudHybridSearch script. I found similar errors on Technet etc but with no solution besides "Open a ticket with MS". Which i might do if you don't have a solution ;)
    – AM2FTW
    Commented Nov 17, 2020 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.