Solved

Exchange 2010 Activesync reporting

Posted on 2012-04-10
8
1,148 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
Read this checklist to learn more about the 15 things you should never include in an email signature.
how to add IIS SMTP to handle application/Scanner relays into office 365.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

11 Experts available now in Live!

Get 1:1 Help Now