Solved

Exchange 2010 Activesync reporting

Posted on 2012-04-10
8
1,144 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
  • 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now