SharePoint commands not working PowerShell in Mac

Jijesh Peter 0 Reputation points
2023-07-14T11:15:16.5366667+00:00

I am trying to run Connect-SPOService Command using PowerShell in Mac. But its givimage

Can anyone please advise?

thanks

Jijesh Peter

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,810 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,329 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,906 Reputation points
    2023-07-17T02:13:49.3733333+00:00

    Have installed the necessary module?

    Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version

    If you can't locate the module, try installing it:

    Install-Module -Name Microsoft.Online.SharePoint.PowerShell

    0 comments No comments

  2. Ling Zhou_MSFT 15,560 Reputation points Microsoft Vendor
    2023-07-17T02:13:54.3333333+00:00

    Hi @Jijesh Peter,

    Thank you for posting in this community.

    According to your detailed description, I do understand how frustrated you are now.

    However, I feel regretful to inform you that SharePoint Online Management Shell does not yet work from a Mac. The reason is that SharePoint Online Management Shell is a Windows PowerShell module.

    Screenshot 2023-07-17 095415

    Reference: Intro to SharePoint Online Management Shell

    Perhaps you could try using PnP PowerShell to connect to SharePoint Online.

    However, to use PnP PowerShell on a Mac, you need to install Homebrew first, then PowerShell, and finally PnP PowerShell.

    Here are the exact steps to follow: How To Run PnP PowerShell In MacOS

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. 

    Here are some cmdlets on how to use PnP PowerShell to manage SharePoint Online: How to Connect to SharePoint Online using PnP PowerShell?

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. 

    We apologize for any inconvenience this may cause. Thank you for your kind understanding!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.