Submit a request

Nerdio Help Center

How Do I Connect to Office365 via PowerShell


Applies to: Nerdio for Azure (NFA) Professional and Enterprise and Core.

Refer this KB article to determine if you are a NFA user.


The following article is useful when there is a need to run remote PowerShell commands for Office 365.  To do this simply follow the steps below: 


Preparing your PowerShell environment

There are two local modules that need to be installed before you run the command to connect to Office 365.  Install the following via PowerShell if they have not been previously installed already.

Install-Module -Name AzureAD

Install-Module MSOnline

The context of this can be found in the following link - https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell


Connecting to Office 365

Open PowerShell and execute the following command: 

Connect-MsolService

When you run the "Connect-MsolService" command, you will get the prompt from Microsoft where you can input the global admin credentials for that account. Once completed the Office365 account should successfully be connected to allow additional PowerShell commands. 

Was this article helpful?
0 out of 0 found this helpful

Comments

Article is closed for comments.