Forum Discussion
The 'Connect-SPOService' command was found in the module, but the module could not be loaded.
t_bara I'm running into the exact same issue. Did you find a solution?
- IanCook_BlueDec 08, 2021Copper Contributor
I'm in the same boat - the only difference being that my Powershell is later. Has a solution been identified??
PS C:\Windows\system32> Install-Module Microsoft.Online.SharePoint.PowerShell -force
PS C:\Windows\system32> Connect-SPOService -Url https://eldertech-admin.sharepoint.com -credential icook@eldertech.com.au
Connect-SPOService : The 'Connect-SPOService' command was found in the module
'Microsoft.Online.SharePoint.PowerShell', but the module could not be loaded. For more information, run 'Import-Module
Microsoft.Online.SharePoint.PowerShell'.
At line:1 char:1
+ Connect-SPOService -Url https://eldertech-admin.sharepoint.com -crede ...
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-SPOService:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModulePS C:\Windows\system32> Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
Name Version
---- -------
Microsoft.Online.SharePoint.PowerShell 16.0.21909.12000
Microsoft.Online.SharePoint.PowerShell 16.0.21811.12000- LuckyLubDec 08, 2021Copper Contributor
IanCook_Blue Hi Ian, I switched to https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/?view=sharepoint-ps, works a lot better for me.
- Dec 08, 2021Hello, Do you have client components too?
"There is a known issue between the SharePoint Online Management Shell module and SharePoint Client Components SDK where the module will fail to load if both are installed on the same computer. If you encounter this issue, uninstall the SharePoint Client Components SDK."
https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online- CooperAdminOct 22, 2024Brass Contributor
Good catch. I installed this the other day for reasons I can't recall, and was suddenly unable to get SharePoint Online Management working in PowerShell today. I was beginning to think I was going crazy.
It's insane that it's been almost 3 years since this was posted and Microsoft STILL hasn't fixed it.