Common Exchange Online Cmdlets
Import-Module




Get-MailboxStatistics
Get-MailboxStatistics
Get-MailboxPlan
# Install Exchange Module
Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.2.0
# Connects to Exchange Online
Connect-ExchangeOnline
​
​
​​​
​
​
​
​
​
​​
​
​
​
​​
​
​
​
#Common Commands:
Get-EXOMailbox | Select Displayname,PrimarySMTPAddress,RecipientType
​
# Get Size of all users mailbox
Get-EXOMailbox | Get-ExoMailboxStatistics |select DisplayName,TotalItemSize
​
# Get Mailbox Enabled Connection Types
Get-EXOCASMailbox | Select PRimarySMTPAddress,OWAEnabled,ImapEnabled,PopEnabled,MAPIEnabled,EwsEnabled,ActiveSyncEnabled
​
​
​
​
​
​
​
​
​​
​
​
​
​
​
​​
#Get Stats for Singe Mailbox
Get-MailboxStatistics -Identity Administrator | fl DisplayName, ItemCount, TotalItemSize, LastLogonTime
​
​
​
​
​​
​
​
​
​
​
#Get Stats for All Mailboxes
Get-Mailbox | Get-Mailboxstatistics | Select Displayname,itemcount,totalitemsize,lastlogontime
​
​
​​
​​
​​
​​
​​
​​
​​
​​
​​
​
​​
​#Get Mailbox Plan to See Exchange Settings
Get-MailboxPlan -Identity ExchangeOnlineEnterprise | Select UserPrincipalName, RetainDeletedItemsFor,ArchiveQuota,ArchiveWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota,RecoverableItemsQuota,RecoverableItemsWarningQuota,CalendarLoggingQuota,LitigationHoldDuration
Use the Get-EXOCasMailbox cmdlet to view the Client Access settings that are configured on mailboxes.
​
-
ActiveSyncEnabled
-
EwsEnabled
-
OWAEnabled
-
PopEnabled
-
ImapEnabled
-
MAPIEnabled
-
ECPEnabled
Get-EXOMailbox

Get-MessageTrace
Get-MessageTrace `
-SenderAddress "Email@Domain.com" `
-StartDate "06/23/2024" `
-EndDate "06/29/2024" | `
Select-Object Received, SenderAddress, `
RecipientAddress, Subject, Status
