PowerShell connection from MacOS not working

%3CLINGO-SUB%20id%3D%22lingo-sub-1514831%22%20slang%3D%22en-US%22%3EPowerShell%20connection%20from%20MacOS%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514831%22%20slang%3D%22en-US%22%3E%3CP%3EI%20trying%20PowerShell%207%20on%20MacOS%20and%20I%20have%20installed%20SharePoint%20Online%20Management%20Shell%20but%20the%20%22%3CSPAN%3EConnect-SPOService%22%20command%20is%20not%20found.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-Module%20SharePointPnPPowerShell*%20-ListAvailable%20%7C%20Select-Object%20Name%2CVersion%20%7C%20Sort-Object%20Version%20-Descending%3C%2FP%3E%3CP%20class%3D%22p1%22%3E%3CSPAN%20class%3D%22s1%22%3EMicrosoft.Online.SharePoint.PowerShell%2016.0.20017.12000%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1514831%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1515005%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20connection%20from%20MacOS%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1515005%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35909%22%20target%3D%22_blank%22%3E%40Bikash%20Maharjan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20found%20that%20my%20attempts%20to%20get%20PowerShell%20to%20work%20on%20MacOS%20have%20resulted%20in%20limited%20success.%26nbsp%3B%20Each%20time%20I%20try%20it%2C%20there%20seems%20to%20be%20slightly%20more%20functionality%2C%20but%20it%20really%20has%20a%20long%20way%20to%20go.%26nbsp%3B%20It's%20too%20frustrating%20at%20the%20moment%20to%20try%20and%20make%20it%20work%2C%20so%20for%20any%20PowerShell%20I%20just%20revert%20to%20my%20Windows%2010%20device%20for%20the%20time%20being.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1516673%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20connection%20from%20MacOS%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1516673%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3BThanks%20for%20confirmation%20-%20I%20was%20wondering%20if%20it%20was%20just%20my%20setup.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1537798%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20connection%20from%20MacOS%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1537798%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35909%22%20target%3D%22_blank%22%3E%40Bikash%20Maharjan%3C%2FA%3E%26nbsp%3B%2C%20I%20run%20into%20the%20same%20or%20at%20least%20similar%20problem.%20Let%20me%20first%20explain%20why%20I%20want%20to%20use%20PowerShell%20end%20then%20explain%20the%20problem%20that%20I%20ran%20into%20(similar%20to%20your%20problem).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22s1%22%3EI%20don't%20have%20a%20PC%2C%20I%20work%20with%20a%20MacBookPro.%20What%20I%20want%20to%20do%20is%20setup%20scripts%20with%20help%20of%20PowerShell%2C%20to%20create%20Team%20sites%20with%20Teams%20plus%20a%20few%20dedicated%20Lists%20which%20I%20need%20to%20provide%20to%20customers%20in%20order%20to%20allow%20a%20PowerApp%20read%2Fwrite%20data%20on%20that%20list.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20latest%20OSX%2C%20I%20wanted%20to%20set%20up%20PowerShell%20for%20MacOS.%20Following%20all%20provided%20information%20in%20Microsoft%20Help%20docs%3A%3C%2FP%3E%3CP%3E-%20installed%20HomeBrew%20(succes)%2C%3C%2FP%3E%3CP%3E-%20installed%20PowerShell%20v%207%20(succes)%3C%2FP%3E%3CP%3E-%20imported%20various%20modules%3A%3C%2FP%3E%3CUL%3E%3CLI%3ETeams%20(Succes)%3C%2FLI%3E%3CLI%3EAZ%20(Succes)%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22p1%22%3E%3CSPAN%20class%3D%22s1%22%3EMicrosoft.Online.SharePoint.PowerShell%20(%3F%3F%3F).%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20class%3D%22s1%22%3EIf%20I%20then%20run%20a%20get-help%20on%20'connect*'%20I%20get%3A%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%20class%3D%22p1%22%3E%3CSPAN%20class%3D%22s1%22%3EConnect-AzAccount%20from%20module%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22s1%22%3EAz.Accounts%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22p1%22%3E%3CSPAN%20class%3D%22s1%22%3EConnect-MicrosoftTeams%20from%20module%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22s1%22%3EMicrosoftTeams%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20class%3D%22s1%22%3ESo%2C%20apparently%2C%20while%20there%20is%20no%20sign%20that%20the%20SPO%20module%20was%20not%20successfully%20imported%2C%20it%20is%20not%20possible%20to%20connect%20to%20SPO.%20Hence%20when%20I%20run%20(with%20the%20variables%20set%20to%20the%20correct%20values)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22s1%22%3E%22%3C%2FSPAN%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSPAN%20class%3D%22s1%22%3EConnect-SPOService%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22s3%22%3E-Url%3C%2FSPAN%3E%3CSPAN%20class%3D%22s2%22%3E%20https%3A%2F%2F%3C%2FSPAN%3E%3CSPAN%20class%3D%22s4%22%3E%24orgName%3C%2FSPAN%3E%3CSPAN%20class%3D%22s2%22%3E-admin.sharepoint.com%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22s3%22%3E-Credential%3C%2FSPAN%3E%20%3C%2FFONT%3E%3CSPAN%20class%3D%22s4%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%24userCredential%3C%2FFONT%3E%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22s4%22%3EI%20get%20the%20response%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22p1%22%3E%3CSPAN%20class%3D%22s1%22%3E%22%3CFONT%20color%3D%22%23FF0000%22%3EConnect-SPOService%3A%20The%20term%20'Connect-SPOService'%20is%20not%20recognized%20as%20the%20name%20of%20a%20cmdlet%2C%20function%2C%20script%20file%2C%20or%20operable%20program.%26nbsp%3B%3C%2FFONT%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22s1%22%3E%3CFONT%20color%3D%22%23FF0000%22%3ECheck%20the%20spelling%20of%20the%20name%2C%20or%20if%20a%20path%20was%20included%2C%20verify%20that%20the%20path%20is%20correct%20and%20try%20again.%3C%2FFONT%3E%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22p1%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22p1%22%3E%3CSPAN%20class%3D%22s1%22%3ENow...%20what%20to%20do%20next%3F%20I%20already%20repeated%20the%20entire%20installation%3A%20no%20effect.%20So%20now%20I%20think%20about%20setting%20up%20PowerShell%20though%20Azure.%20Do%20you%20or%20anyone%20else%20have%20an%20idea%20how%20to%20do%20that%3F%20Help%20is%20much%20appreciated!%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1797347%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20connection%20from%20MacOS%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1797347%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35909%22%20target%3D%22_blank%22%3E%40Bikash%20Maharjan%3C%2FA%3E%26nbsp%3BI%20have%20spent%20several%20hours%20attempting%20to%20get%20this%20to%20work%2C%20to%20come%20to%20the%20same%20conclusion%3A%20the%20Install-Module%20command%20seems%20to%20work%2C%20but%20then%20doesn't%20seem%20to%20actually%20install%20what's%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20less%20than%205%20minutes%2C%20I%20fired%20up%20Parallels%20and%20had%20everything%20working%20in%20Windows%2010%2C%20doing%20exactly%20the%20same%20thing%20I%20was%20attempting%20in%20MacOS.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20some%20technical%20problem%20to%20be%20fixed%20by%20Microsoft%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1801343%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20connection%20from%20MacOS%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1801343%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F838387%22%20target%3D%22_blank%22%3E%40Jamesr2049%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20is%20more%20something%20for%20Apple%20to%20fix%20than%20Microsoft%20I%20think.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1830831%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20connection%20from%20MacOS%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1830831%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616707%22%20target%3D%22_blank%22%3E%40PeterRising%3C%2FA%3E%26nbsp%3BIndeed%2C%20Peter%2C%20I%20had%20the%20same%20problem%2C%20but%20at%20some%20point%20was%20informed%20by%20someone%20from%20PowerShell%20development%20that%20this%20is%20indeed%20not%20working.%20So%2C%20I%20made%20my%20Mac%20dual%20boot%20and%20installed%20a%20full%20Windows%2010%20using%20Bootcamp.%20Works%20perfect.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I trying PowerShell 7 on MacOS and I have installed SharePoint Online Management Shell but the "Connect-SPOService" command is not found. 

 

Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending

Microsoft.Online.SharePoint.PowerShell 16.0.20017.12000

6 Replies

@Bikash Maharjan 

 

I have found that my attempts to get PowerShell to work on MacOS have resulted in limited success.  Each time I try it, there seems to be slightly more functionality, but it really has a long way to go.  It's too frustrating at the moment to try and make it work, so for any PowerShell I just revert to my Windows 10 device for the time being.

@PeterRising Thanks for confirmation - I was wondering if it was just my setup. 

Hi @Bikash Maharjan , I run into the same or at least similar problem. Let me first explain why I want to use PowerShell end then explain the problem that I ran into (similar to your problem).

 

I don't have a PC, I work with a MacBookPro. What I want to do is setup scripts with help of PowerShell, to create Team sites with Teams plus a few dedicated Lists which I need to provide to customers in order to allow a PowerApp read/write data on that list.

 

Using latest OSX, I wanted to set up PowerShell for MacOS. Following all provided information in Microsoft Help docs:

- installed HomeBrew (succes),

- installed PowerShell v 7 (succes)

- imported various modules:

  • Teams (Succes)
  • AZ (Succes)
  • Microsoft.Online.SharePoint.PowerShell (???).

If I then run a get-help on 'connect*' I get:

  • Connect-AzAccount from module Az.Accounts

  • Connect-MicrosoftTeams from module MicrosoftTeams

So, apparently, while there is no sign that the SPO module was not successfully imported, it is not possible to connect to SPO. Hence when I run (with the variables set to the correct values)

"Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential"

I get the response:

"Connect-SPOService: The term 'Connect-SPOService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."

 

Now... what to do next? I already repeated the entire installation: no effect. So now I think about setting up PowerShell though Azure. Do you or anyone else have an idea how to do that? Help is much appreciated! 

@Bikash Maharjan I have spent several hours attempting to get this to work, to come to the same conclusion: the Install-Module command seems to work, but then doesn't seem to actually install what's needed.

 

In less than 5 minutes, I fired up Parallels and had everything working in Windows 10, doing exactly the same thing I was attempting in MacOS.

 

Is there some technical problem to be fixed by Microsoft?

@Jamesr2049 

 

This is more something for Apple to fix than Microsoft I think.

@PeterRising Indeed, Peter, I had the same problem, but at some point was informed by someone from PowerShell development that this is indeed not working. So, I made my Mac dual boot and installed a full Windows 10 using Bootcamp. Works perfect.