In the Microsoft 365 environment, especially Exchange Online PowerShell is a powerful tool for managing critical services such as . Connecting to Exchange Online using PowerShell allows administrators to manage mailboxes, set user permissions, and perform various configurations.
Exchange Online PowerShell Module Installation
In our previous article Exchange Online PowerShell Module We mentioned its installation, you can access the relevant article via the link below.
Connecting to Exchange Online with PowerShell
After the module is installed, you can connect to Exchange Online PowerShell with the commands I have provided below.
First, you need to open PowerShell with Run as Administrator.
Connect-ExchangeOnline -UserPrincipalName [email protected]
It will then ask you to provide admin password information and Modern Authentication to perform MFA verification.
- https://yilmazcengiz.tr/modern-authentication-neleri-degistirir/
- https://yilmazcengiz.tr/office-2013-modern-authentication-enabled/
Connect-ExchangeOnline -UserPrincipalName [email protected]
----------------------------------------------------------------------------------------
This V3 EXO PowerShell module contains new REST API backed Exchange Online cmdlets which doesn't require WinRM for Client-Server communication. You can now run these cmdlets after turning off WinRM Basic Auth in your client machine thus making it more secure.
Unlike the EXO* prefixed cmdlets, the cmdlets in this module support full functional parity with the RPS (V1) cmdlets.
V3 cmdlets in the downloaded module are resilient to transient failures, handling retries and throttling errors inherently.
REST backed EOP and SCC cmdlets are also available in the V3 module. Similar to EXO, the cmdlets can be run without WinRM basic auth enabled.
For more information check https://aka.ms/exov3-module
The Exchange Online PowerShell connection provisioning process is complete, now we can provide a checkout process for testing.
I will query the details of an account with Get-Mailbox.
get-mailbox [email protected] | fl
Exchange Online PowerShell Log Out
It is important to log out of Exchange Online PowerShell after you complete your actions. Otherwise, open sessions may continue to be used, and you may encounter problems starting new sessions. To log out, use the following command:
Disconnect-ExchangeOnline -Confirm:$false
In this article, we talked about how to connect to Exchange Online PowerShell and how to close the session.
One comment on “Connecting to Exchange Online PowerShell”