Solved

Exchange 2010 Activesync reporting

Posted on 2012-04-10
8
1,175 Views
Last Modified: 2012-05-01
I am looking to generate a report in Exchange 2010 for a specific group of users.  Below is the desired output.


DeviceImei                    : A1000017E689D3
DeviceFriendlyName            : HTC Gold
DeviceOS                      : Windows Phone7.0.7403
DeviceOSLanguage              : English
DevicePhoneNumber             : ******8735

I am new to Powershell and have looked through various forums. Any help would be appreciated. Also are there any software tools which could generate this type of report?
0
Comment
Question by:bluegrasscell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 26

Expert Comment

by:pony10us
ID: 37828271
Here is a script that I found awhile back (sorry can't remember exactly where) and use that can probably be modified to fit your requirements. Rename as a .vbs.  I have a bat file set up in scheduled tasks to run this every day.
iphone-No-Prompts.txt
0
 
LVL 34

Expert Comment

by:Shreedhar Ette
ID: 37828674
0
 
LVL 26

Expert Comment

by:pony10us
ID: 37828699
@shreedhar

I haven't had time to review/compare your script to what we use however I was wondering how you handle devices no longer in use? Our script doesn't account for when a user purchases a new device. It just adds the new device and continues to show the old one.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:bluegrasscell
ID: 37832333
Here is the script we are using. It keeps getting errors.



$Date = Get-Date -uformat "%Y%m%d"
$Logfile = "C:\Logs\ActiveSync-all-$date.txt"
$Devices = @()
Add-Content -path $LogFile "name,devicemodel,devicetype,useragent,lastsynctime"

$Mailboxes = Get-CASMailbox -ResultSize Unlimited | Where {$_.HasActiveSyncDevicePartnership -eq $True -and $_.OrganizationUnit –eq ‘Domain.local/Engineering/Dept’}}
ForEach ($mailbox in $mailboxes){
    $Devices= Get-ActiveSyncDeviceStatistics -Mailbox $mailbox.name
    $name = $mailbox.Name
    ForEach ($device in $devices) {
        $Model = $Device.DeviceModel
        $Type = $Device.DeviceType
        $LastSyncTime = $Device.LastSuccessSync
        $UserAgent = $Device.DeviceUserAgent
        Add-Content -path $Logfile "$name,$Model,$Type,$UserAgent,$LastSyncTime"
    }
}
0
 
LVL 26

Expert Comment

by:pony10us
ID: 37851853
You don't mention what errors you are getting so I copied your text and ran it on our domain.

The only error I get so far is from this line:

$Mailboxes = Get-CASMailbox -ResultSize Unlimited | Where {$_.HasActiveSyncDevicePartnership -eq $True -and $_.OrganizationUnit –eq ‘Domain.local/Engineering/Dept’}}

There is an additional close bracket "}" at the end of the line. After removing that bracket it seemed to run okay.


I also noticed that $_.OrganizationUnit was incorrect - it should be $_.OrganizationalUnit

Are you running this script on the Exchange server? Do you have the Exchange Cmdlets installed?

http://www.powershellinside.com/articles/ssh/exchange/#exchange
0
 

Accepted Solution

by:
bluegrasscell earned 0 total points
ID: 37897287
Thanks for all the help.  We ended up running a command to pull the info we needed by changing the way it outputted.  It displayed the info we needed.

Get-ActiveSyncDevice -Organizationalunit "OU=NameofOU,DC=domain,DC=com" | fl FriendlyName,DeviceImei,DeviceOS,DeviceTelePhoneNumber,UserDisplayName | Convertto-CSV | Out-File T:\temp\output2.txt
0
 

Author Closing Comment

by:bluegrasscell
ID: 37913817
We researched the commands needed to pull the basic info that we needed.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question