powershell modules

Rising Flight 4,356 Reputation points
2022-02-20T17:18:54.183+00:00

Hi All

i want to install exchange online PowerShell module, SharePoint PowerShell module and teams module. Are the below syntaxes correct.

Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Connect-SPOService (get-credential -UserName myuser@mydomain.com) -Url https://mydomain-admin.sharepoint.com

Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5
Connect-ExchangeOnline -UserPrincipalName myuser@mydomain.com
Connect-IPPSSession -UserPrincipalName myuser@mydomain.com

Install-Module -Name MicrosoftTeams -Force -AllowClobber
Connect-MicrosoftTeams

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,626 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,504 questions
{count} votes

Accepted answer
  1. Ashok M 6,511 Reputation points
    2022-02-20T17:51:46.043+00:00

    Hi @Rising Flight ,

    Yes this looks ok. Please make sure to install the PowershellGet using the below command in order to install other modules online. Kindly also check the pre requisites for installing it.

    Install-Module -Name PowerShellGet -Force -AllowClobber

    Reference
    https://learn.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.2
    https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#install-and-maintain-the-exo-v2-module
    https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-install#installing-using-the-powershellgallery
    https://learn.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online#to-connect-with-a-user-name-and-password

    If the above suggestion helps, please click on "Accept Answer" and upvote it.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. T. Kujala 8,711 Reputation points
    2022-02-20T17:52:12.783+00:00

    Hi @Rising Flight ,

    Yes, you are right.

    Install-Module -Name MicrosoftTeams -Force -AllowClobber
    Install-Module -Name Microsoft.Online.SharePoint.PowerShell
    Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5

    0 comments No comments

  2. risolis 8,721 Reputation points
    2022-02-20T20:39:11.88+00:00

    @Rising Flight

    Try the following syntax >>>>> -Force -SkipPublisherCheck

    0 comments No comments

  3. CaseyYang-MSFT 10,426 Reputation points
    2022-02-21T09:45:02.387+00:00

    Hi @Rising Flight ,

    About "New-ExoPSSession : Create Powershell Session is failed using OAuth" error, you could check the WinRM configuration by following PowerShell command: winrm get winrm/config/client/auth.

    For Reference:
    Connect-ExchangeOnline (OAth fun)
    Create Powershell Session is failed using OAuth when using the Exchange Online V2 PowerShell module


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.