Get-MailboxActiveSync
Exchange Online: Retrieves ActiveSync settings for a mailbox
#Requires -Version 5.1
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[string]$MailboxId
)
Process {
try {
$result = Get-CASMailbox -Identity $MailboxId -ErrorAction Stop | Select-Object ActiveSyncEnabled, PrimarySmtpAddress, DisplayName
[PSCustomObject]@{
Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
ActiveSyncEnabled = $result.ActiveSyncEnabled
PrimarySmtpAddress = $result.PrimarySmtpAddress
DisplayName = $result.DisplayName
}
}
catch { throw }
}Identity of the mailbox (alias, display name, DN, SAM, GUID, or UPN)