07-10-2020 09:24 AM
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
07-10-2020 10:09 AM
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.
07-11-2020 06:15 PM
@PeterRising Thanks for confirmation - I was wondering if it was just my setup.
07-22-2020 12:24 AM
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:
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!
10-19-2020 02:35 PM
@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?
10-20-2020 01:41 PM
10-28-2020 11:41 PM
@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.