List Mobile Devices connected using ActiveSync on Office 365

listmobiloffice365

Connect to Exchange Online
$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

Get-Mailbox -ResultSize Unlimited | ForEach {Get-MobileDeviceStatistics -Mailbox:$_.Identity} | export-csv “c:\ActiveSyncDevices.csv”

Remove-PSSession $Session

Connect to Exchange Online using remote PowerShell

 

 

Leave a Reply

Your email address will not be published.


CAPTCHA Image
Reload Image

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WhatsApp Logo IT World