skip to Main Content

Connect to Exchange Online PowerShell with ISE using MFA

How to connect to Exchange Online in Office 365 with PowerShell ISE using MFA? The organization enabled MFA and you can’t connect to Exchange Online PowerShell anymore. The good thing is that the organization enabled MFA when using Office 365. The bad thing is that you can’t connect anymore. In this article, you will learn how to connect to  Exchange Online PowerShell with ISE using MFA.

Before you start connecting to Exchange Online PowerShell with ISE

First, go to Programs and Features and make sure that you have Microsoft Exchange Online PowerShell Module installed on the machine. If you don’t have it installed, read the article Connect to Exchange Online PowerShell using MFA. If you have the Exchange Online PowerShell Module installed. Go to the next step.

Connect to Exchange Online PowerShell with ISE using MFA Programs and Features

Connect to Exchange Online PowerShell with ISE using MFA

You need to import the Exchange Online PowerShell module if you want to use PowerShell ISE.

Start PowerShell ISE as administrator. Run two commands. The first will import the Exchange Online PowerShell module. The second will connect to Exchange Online in Office 365.

In the sign-in window that opens, enter your password, and then click Sign in.

Connect to Exchange Online PowerShell with ISE using MFA enter password

A verification code is generated and delivered based on the verification response option that’s configured for your account (for example, a text message or the Azure Authenticator app on your mobile phone).

In the verification window that opens, enter the verification code, and then click Verify.

Connect to Exchange Online PowerShell with ISE using MFA enter code

After the verification succeeds, you will get back to the PowerShell window.

How do you know that the connection to Exchange Online PowerShell worked?

Run the Get-Mailbox cmdlet as shown in the previous step. You will see a list of all the mailboxes in Office 365.

Sign out from PowerShell Online when you are finished

Be sure to disconnect the remote PowerShell session when you’re finished. If you close the Exchange Online PowerShell Module window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you’ll need to wait for the sessions to expire.

Conclusion

In this article, you learned how to connect to Exchange Online PowerShell with ISE using MFA. Make sure that the Exchange Online PowerShell Module is installed. After that, connect to Exchange Online in Office 365 with ISE using MFA. Did you enjoy this article? You may also like Get disk free space with PowerShell. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Connect with ALI TAJRAN on social media. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top