Archive

Archives pour 08/09/2009

Exporter les statistiques ActiveSync.

Permet de faire un export des statistiques ActiveSync de tous les utilisateurs actifs.

?View Code POWERSHELL
$result_file = New-Item -ItemType file -Path ActiveSyncStats.txt -Force
Add-Content -Path $result_file -Value "Identity,DeviceType,FirstSyncTime,LastSuccessSync"
$users = Get-CASMailbox -ResultSize unlimited | Where-Object { $_.ActiveSyncEnabled -eq "true" -and  $_.HasActiveSyncDevicePartnership -eq "true" } 
Foreach ($mb in $users) {
#Write-Host $_.identity
$stats = Get-ActiveSyncDeviceStatistics -Mailbox $mb.identity
Add-Content -Path $result_file -Value "$($mb.Name),$($stats.Identity),$($stats.DeviceType),$($stats.FirstSyncTime),$($stats.LastSuccessSync)"
}