Open 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

Leave a Reply

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

*
*