-----provide ad\exchange\lync\sharepoint\crm\sc\o365 and other Microsoft product implementation and outsourcing, qq:185426445. Phone 18666943750
Get-activesyncdevice Get mobile device information that the current user owns using the ActiveSync protocol
Get-activesyncdevicestatistics getting connection information for the current device
The Exchange 2013 command has been changed to the following command:
Get-mobiledevice Get mobile device information that the current user owns using the ActiveSync protocol
Get-mobiledevicestatistics getting connection information for the current device
The script is as follows:
Add-pssnapin microsoft.exchange*
$device =get-mobiledevice-resultsize Unlimited | Foreach-object {$_.identity}
$userlist = @ ()
foreach ($i in $device)
{
$DeviceStatistics =get-mobiledevicestatistics $i
$username =get-mobiledevice $i | Select-object Userdisplayname,name,friendlyname,devicetype,devicemodel,firstsynctime | Sort-object Userdisplayname
$userobject =new-object PsObject
$userobject | Add-member-membertype noteproperty-name Login name-value $username. Userdisplayname
$userobject | Add-member-membertype noteproperty-name Device detailed name-value $username. Name
$userobject | Add-member-membertype noteproperty-name device name-value $username. FriendlyName
$userobject | Add-member-membertype noteproperty-name Device Type-value $username. DeviceType
$userobject | Add-member-membertype noteproperty-name device Model-value $username. Devicemodel
$userobject | Add-member-membertype noteproperty-name First sync time-value $username. Firstsynctime
$userobject | Add-member-membertype noteproperty-name Device status-value $DeviceStatistics. Status
$userobject | Add-member-membertype Noteproperty-name Last Sync time-value $DeviceStatistics. Lastsuccesssync
$userlist + = $userobject
Echo $userlist
}
$userlist | Export-csv-path c: \ "Mobile device login summary table. csv"-notypeinformation-encoding utf8650) this.width=650; "Width=" 916 "height=" 314 " Title= "1.png" style= "width:713px;height:285px;" src= "http://s3.51cto.com/wyfs02/M02/59/B8/ Wkiom1tczz-xujplaamr7tvxskw678.jpg "alt=" Wkiom1tczz-xujplaamr7tvxskw678.jpg "/>
The final effect is as follows:
650) this.width=650; "Width=" 1137 "height=" 585 "title=" 1.png "style=" width:714px;height:490px; "src="/HTTP/ S3.51cto.com/wyfs02/m00/59/b5/wkiol1tc0mxyhksraal3ith7h_m947.jpg "alt=" Wkiol1tc0mxyhksraal3ith7h_m947.jpg "/>
This article is from the "Zhou Ping Microsoft Technology Exchange Platform" blog, please be sure to keep this source http://yuntcloud.blog.51cto.com/1173839/1614177
PowerShell Management Series (22) PowerShell Operations statistics mobile device logon Exchange situation