How to connect to Office 365 with PowerShell



As an Administrator for Office 365, you can use PowerShell to manage a lot of your administrative tasks such as user management and domain management.

The following is needed:

  1. MS Online Services Assistant needs to be downloaded and installed
  2. MS Online Module for PowerShell needs to be  downloaded and installed
  3. Connect to Microsoft Online in PowerShell
    Download MS Online Services Assistant

Download the OS version needed:

      Download Online Module for PowerShell

    Download the OS version needed:

        Connect to MS Online in PowerShell

      Open a PowerShell session and import the MS Online Module using:

      Import-Module MsOnline


      Connect with your Microsoft Online tenant account using:



      Use your tenant account e.g.

        Now you are ready to work with PowerShell against your Office 365 account. If you need a list of the cmdlets available, see the reference documentation link below or run the following PowerShell command:

      Get-Command -Module MsOnline



        Reference documentation:

      3 thoughts on “How to connect to Office 365 with PowerShell”

      Comments are closed.