How do I install the exchange online powershell?

Peak Foam Solutions 0 Reputation points
2025-09-11T14:30:24.8433333+00:00

I am not sure where I am supposed to paste the Install-Module -Name ExchangeOnlineManagement command. I am very confused about everything. I need to add a user for outlook to my domain.

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Austin-H 8,370 Reputation points Microsoft External Staff Moderator
    2025-09-12T01:48:12.58+00:00

    Hi @Peak Foam Solutions
    Thank you for posting question to Microsoft Q&A.
    Please follow these steps:

    1.Open PowerShell as Administrator
    User's image

    2.Run these commands

    Set-ExecutionPolicy RemoteSigned
    Install-Module ExchangeOnlineManagement -RequiredVersion 3.7.0
    Import-Module ExchangeOnlineManagement
    Connect-ExchangeOnline
    

    It should look like this:

    User's image

    1. If you need to add new user, you might need to install Microsoft Graph in order to do that so - it is more tricky as assign license via PowerShell is more difficult than do it in Microsoft 365 Admin Center as it needs you to know your license specific detail.

    You might need to follow Marcin's instruction above to access to Microsoft 365 Admin Center and create the new user then assign license (Exchange Online Plan 1/2, Microsoft 365 Business Basic/Standard/Premium, etc...)
    Hope this helps.


    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. 

    Was this answer helpful?


  2. Marcin Policht 103.6K Reputation points MVP Volunteer Moderator
    2025-09-11T17:14:22.8866667+00:00
    1. Install-Module -Name ExchangeOnlineManagement`

    This command is PowerShell command used to install the Exchange Online Management module, which lets you manage Microsoft 365 mailboxes and users in Outlook (Exchange Online).

    • Where to run it: You need to run it in PowerShell on your PC, not in Outlook or any web portal.
    • Steps:
      1. Press Windows + S → type PowerShell → right-click Windows PowerShell → Run as administrator
      2. In the PowerShell window, type:
             Install-Module -Name ExchangeOnlineManagement
        
        Press Enter.
      3. If prompted about “NuGet provider” or “untrusted repository,” type Y and press Enter.

    This installs the module that allows you to connect to Exchange Online and manage users/mailboxes.

    1. Adding a user for Outlook

    If your goal is just to add a user so they can have an Outlook mailbox, there are two paths depending on your environment:

    A. If your company uses Microsoft 365 (cloud):

    • You create the user in Microsoft 365 Admin Center:
      1. Go to https://admin.microsoft.com
      2. Sign in with your admin account.
      3. Navigate to Users → Active Users → Add a user.
      4. Fill in the info and assign an Exchange Online license (this gives them Outlook email).

    B. If your company uses on-premises Exchange (in your own domain):

    • You would typically:
      1. Open Active Directory Users and Computers on your server.
      2. Right-click the OU → New → User.
      3. Follow the wizard to create the user.
      4. Then assign them a mailbox in Exchange (either via Exchange Admin Center or PowerShell using the Exchange module).

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

Your answer

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