Open Exchange Online Powershell without MFA

MASEE Solution Guide - Technical Dept Head
CERTIFIED EXPERT
Most Valuable Expert2017.
Exchange Server, Windows Server, Active Directory, Virtualization, Skype for Business and Email Migration Expert.
Published:
Edited by: Andrew Leniart
This article helps you to connect to Exchange Online Powershell without MFA
Connect to Exchange Online Powershell without MFA

Step 1
Open an elevated Powershell. Click Yes at the User Access control Window.



Step 2
Set the execution policy to RemoteSigned by running the following command.

Set-ExecutionPolicy RemoteSigned
Type Y and enter.

.
Step 3
Type the following command and press enter button. Enter your Office 365 credentials at the popup.

$UserCred = Get-Credential

Step 4
Prepare the session by running the following command.

Code referenceBasic auth - Connect to Exchange Online PowerShell
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCred -Authentication Basic -AllowRedirection

Step 5
Import the session using the following command.

Import-PSSession $Session
You will see the following screen when the command is being run successfully.


Once it is completed you will see the following screen.


Now you are connected to Exchange Online Powershell.


If you want to login to Exchange Online Powershell with MFA please check this article

0
182 Views
MASEE Solution Guide - Technical Dept Head
CERTIFIED EXPERT
Most Valuable Expert2017.
Exchange Server, Windows Server, Active Directory, Virtualization, Skype for Business and Email Migration Expert.

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.

Get access with a 7-day free trial.
You Belong in the World's Smartest IT Community