Open Exchange Online Powershell without MFA

M AService Manager
CERTIFIED EXPERT
Most Valuable Expert2017 and 2020.
O365, Exchange Server,Windows Server, Active Directory, Virtualization, Teams 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

1
1,228 Views
M AService Manager
CERTIFIED EXPERT
Most Valuable Expert2017 and 2020.
O365, Exchange Server,Windows Server, Active Directory, Virtualization, Teams 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.