Recently I was asked whether I had any PowerShell scripts available for producing a simple report of the ActiveSync devices for an Exchange organization. I didn’t have a script at the time but was able to quickly put one together that did the job, though it was a little rough.

I’ve since updated the script to make it more functional and reliable, and I am releasing it here for the community to download and make use of as well.

This script is available for download on the TechNet Script Gallery or Github. Comments are welcome below. If you find a bug please consider raising it as an issue on Github.

Simply run the script in the Exchange Management Shell to produce the report in CSV format.

[PS] C:\Scripts>.\Get-EASDeviceReport.ps1

The report is written to a CSV file in the same folder that the script is located.

easdevicereport

You can also send the CSV report via email, and specify an “age” in days for the last sync attempt of the device, for example to only report on devices that have not attempted sync in 30 days.

PS C:\Scripts> .\Get-EASDeviceReport.ps1 -Age 30 -SendEmail -MailFrom exchangeserver@exchangeserverpro.net -MailTo administrator@exchangeserverpro.net -MailServer smtp.exchangeserverpro.net

get-easdevicereport-email

This script is available for download on the TechNet Script Gallery or Github. Comments are welcome below. If you find a bug please consider raising it as an issue on Github.

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. Ken M

    Hi Paul,
    I really like this script, its been pretty helpful, I do have one question.
    How can I modify the script to include device GUID in the report?
    Ive tried to change it myself but my powershell scripting stinks and all I get is a column in the report with GUID, but its empty.
    Im obviously missing something.
    Can you help at all?
    Thanks!

    1. Derrick

      I need this too. Did he answer you?

  2. Andrew Duey

    1) THANKS!!!! this did 99% of what we needed.

    2) We did find however that under Exchange Server 2013 CU23 that missed some devices (it appears it was “OWA for Devices on iPad” that were missed). These are listed as activesync devices in the Mobile Device Details screen. If we changed Get-ActiveSyncDeviceStatistics to Get-MobileDeviceStatistics then the script found those devices as well. When we ran the script with that one change everything APPEARED to work.

    Thanks for sharing the initial script as it got us 99% of the way there!!!!

  3. Luigi

    I can’t thank you enough for this! It’s exactly what I needed and some!

  4. Sanju

    Could you please add GUID of activesync devices as well to be displayed along with the info already available. Or even better if you could give a script to remove stale devices which are more than ‘x’ number of days

  5. Alaa

    Hi Paul, Truly amazing. Thanks so much!

    Can I somehow to add a notification in case of change the DeviceID? like Gmail, one of security approach to rise their security level to notify their users about signing in once a user using a new device.
    Do have the same in Exchange 2016 on-premises environment?

    really appreciated your help..
    regards,

  6. Craig

    Paul

    How can I remove those that are over the 30days? Is it a matter of adding:

    .\Get-EASDevieReport.ps1 -Age 30 | Remove-MobileDevice

    1. noufal

      Is remove-mobiledevice working?

  7. shawn

    Good day all,

    I tried running this script remotely from a windows 10 client and my exchange server environment is 2013 and got the below error:

    WARNING: The Windows PowerShell snap-in ‘Microsoft.Exchange.Management.PowerShell.E2010’ is not installed on this
    computer.

      1. Noufal

        Hi Paul,

        Is below will remove mobiledevice from exchange older than 30 days

        .\Get-EASDevieReport.ps1 -Age 30 | Remove-MobileDevice

  8. Chris

    Paul,

    Thanks! You have saved me countless hours trying to figure out how to script this on my own. Just one question though. If I needed to then remove the devices that were older than 30 days, would I be able to just pipe this to Remove-MobileDevice.

    Ex. – .\Get-EASDevieReport.ps1 -Age 30 | Remove-MobileDevice

    Thanks,
    Chris

  9. Sujithkumar Suriyamurthy

    Its an amazing scritp! I was wondering if you have same kind of script for Exchange Online.

  10. Hans

    I’ve been using this script for Exchange 2010 reports, and it works great. I did however end up having to rewrite it a bit and replace get-activesyncdevice with get-mobiledevice to be able to include MOWA, REST and Outlook client types.

    Maybe it should be mentioned since many people will expect the Outlook for iOS/Android to show up in the report even if it is not using EAS protocol.
    Anyway, thanks for all the great articles on this page.

    PS. For special characters, i prefer using -encoding default

    1. Paul Cunningham

      Good tip, thank you. I have that issue logged in Github for the script but it’s just a matter of me or someone finding the time to update it.

  11. Jim

    Paul – i can’t get to this run ..

    Warning no-snap-ins have been registered for Windows Powershell version 5 .

    I’ve installed all of the exchange online modules into the environment this is for Office365 using MFA .. followed all the online .. and yes do understand this runs inside exchange powershell but that option is not available.

  12. Rick

    Paul,

    Thank you for the amazing script, it generated way more information than I needed and it worked without any tweaks. Can you advise on how I could add pulling activesync hits to this script as well?

    1. Paul Cunningham

      ActiveSync hits are logged in IIS logs. LogParser Studio has some pre-configured reports for pulling out that information. You can also export LogParser Studio commands to PowerShell scripts. The challenge would then be integrating both scripts together, which would be a fair bit of work but not impossible I imagine.

  13. David P. Constantine

    I am not an engineer, but I am responsible for Compliance for our customers. Will this script work with the latest versions of Exchange? Our internal engineers tell me the script we have used for Exchange 2008- 2012 will not run on later version of exchange. Your scripts have saved me a lot of time over the last few years.

  14. James Schmidt

    Paul,

    Awesome script. Is there a way to display the OU of each user in the output?

    Thanks

  15. Armando

    Greetings Paul,

    First, I’d like to thank you for all your scripts (tried 5 of them so far – they are awesome!).

    I have a quick “nooby” question. How should I change the script to show only active devices that successfully synced in the last 7 days? Trying to identify personal (rogue) devices with mail client setup. It would be quicker than filtering the original .csv file with all the data.

    Thank you very much.

    1. Paul Cunningham

      Open the script in PowerShell ISE or in VS Code and look for the lines that have the logic for including/excluding based on last sync time.

      But to be honest with you, the script has to check every device anyway. So it will still take as long to run. Personally I tend to just grab everything and do my analysis in Excel.

      1. Armando

        Thank you for your reply.

        Will check that.

  16. Kalyan

    Hi Paul,

    First of all thanks a ton for this script.

    I can run the PS command to send mail but I am trying to schedule this script through task scheduler, I’ve edited the script as below:

    $smtpsettings = @{
    To = myname@domain.com
    From = teamname@domain.com
    Subject = reportemailsubject
    SmtpServer = smtpserver.domain.com
    }

    But its not generating any mail.

    1. Kalyan

      Adding to my above query I want to remove the devices which have not synced more than 30 days with the below cmdlet in the script

      Get-Content .list.txt | Get-ActiveSyncDevice | Remove-ActiveSyncDevice

      List.txt file which contains the guid of devices to be removed. This will work manually.

      Please let me know how to schedule it once the first script completed it should call the 2nd for the action

      1. Sandeep

        Hi Kalyan,

        Please let me know if you got script can email device details along with old devices removal part.

  17. Helao

    Hi Paul

    How can i modify the script to run the entire forest and not just the top level domain?

    1. Krid

      Hi Helao,

      you need to set the scope of the current session to the entire forest

      Set-AdServerSettings -ViewEntireForest $true

      before you start the script.

  18. CC

    Great script Paul ………..

  19. Byo

    thanks

  20. Michael Brandley

    We have multiple domains at our location (one forest) and I needed to include the domain name in the report so I modified it as follows:

    Right after the “Write-Host -ForegroundColor Green “Processing $($EASDevice.DeviceID)”” entry, I added…

    $FullIdentity = ($Mailbox.Identity).toString()
    $Domain = $FullIdentity.Split(“/”)[0]

    Then added…

    $reportObj | Add-Member NoteProperty -Name “Domain” -Value $domain

    I’m not a programmer by any means – I’m terrible in fact – so I’m sure there is a better way to do this but it worked for what I needed 🙂

    1. Paul Cunningham

      “it worked for what I needed” is pretty good success criteria.

  21. Thomas Monday

    Can you advise on how I can get it to run on child domains? Exchange sits in the root and the users are in multiple child domains.

  22. Mike

    Paul, do you know of a way how to tetermine if a device is enrolled in an MDM solution? Get-MobileDevice “ismanaged” states only if a device is supervised or not, right? I am currently looking for a way to filter ActiveSync devices which are enrolled with Intune since Conditional Access with hybrid Intune, Exchange On-Premise and Outlook app is not supported. Thanks

    1. Paul Cunningham

      My devices that are managed using O365 MDM have a DeviceAccessStateReason of “ExternallyManaged”, so that might work in your case.

  23. Riaan

    Good Day Paul.

    I’m struggling to add multiple mail recipients to the script any ideas?

    Error: ‘MailTo’. Cannot convert value to type System.String.

    I’m separating mail addresses with commas.

    Thanks

    1. Riaan

      No Worries got it working 🙂

  24. Kartik

    Paul,

    I tried downloading the script from both technet script gallery and github but at both places the content of script file lost formatting. I tried doing wordwrap in notepad but still the script content looks gibberish. Is there some other place from where I can download this script?

    1. Paul Cunningham

      That seems to happen if you try to open/edit the file directly from within the Zip file. It seems fine when I first extract the script from Zip file, and then open it in the PowerShell ISE.

      1. Kartik

        Can’t believe received such a quick response from Exchange Legend himself. 🙂

        It worked in ISE like you mentioned. Thanks a ton for writing outstanding scripts and sharing amazing tips!!

  25. rino

    i have a question regarding “last successful sync”. why on some users it returns empty even though the user have checked his email a few days back?

  26. J Nichols

    I try to run your script Get-EASDeviceReport.ps1 but get the following exception:
    WARNING: Cannot load Windows PowerShell snap-in Microsoft.Exchange.Management.PowerShell.E2010 because of the following
    error: The type initializer for ‘Microsoft.Exchange.Data.Directory.Globals’ threw an exception.

    We have a Hybrid configuration, where we use Exchange 2013 for Office 365 and two local servers for connectivity to Exchange online.

    1. Paul Cunningham

      I’ve not seen that error before myself, so I don’t have any suggestions I’m afraid.

  27. Kenneth B

    Hi Paul;

    We are looking to run your script in our environment but the output only stated people within a certain domain. Is there a way to have the script pull users information from another domain ?
    (Exchange 2010 sits on same server as domain.company.com but we have users in otherdomain.company.com that we need to report on)

    Our goal is to verify which users are using what devices to connect to our Exchange server especially with the vulnerability of Outlook for iOS.

    Thanks for reading and assisting.

      1. Kenneth B

        Paul;

        Truly amazing. Thanks so much! It worked!

  28. Vinod

    Hi Paul

    Can we get similar script for office 365?

  29. Kapil K

    Thanks Paul

  30. Kapil K

    Hi Paul,

    I need your help for my active issue.
    I am working on Exchange 2103 CU8, I have deployed a new active policy for my users for applying the security policies on the mobile devices which connects to my Exchange server with active sync. I have configured a 4 digit simple password with no wipe out in case of logon failures. I have also enabled recovery password in the same, but none of the mobile devices provides recovery password to Exchange server and I am unable to unlock the user’s mobile device in case user forgets the password. I have also tested Windows Phones but there also I am failing to get the recovery password. I tested some of Samsung Android devices, these devices provides the recovery password but the device itself does not accept the same password. Need your suggestion for resolving the same.

    1. Kapil K

      Sorry its Exchange 2013

      1. Kapil K

        Hi Paul,

        I had already referred the given article but it does not shows about Exchange 2013. Please let me know if recovery password is supported for Exchange 2013 or if any other rule needs to be enabled in the new policy. I have checked the devices which supports 14.1 client version.
        Please let me know if I can share the Get-MobileDeviceStatistics output with you for one of the device.

        1. Paul Cunningham

          It’s up to the client whether that ActiveSync feature is supported or not. It looks like almost no mobile OS supports that feature, according to that Wiki article.

  31. J. Greg Mackinnon

    Nice script… under Exchange 2013 and 2016, the Get-ActiveSyncDevice* cmdlets are deprecated. I revised the script to use “Get-MobileDevice*” instead. Also, I reworked the script to use “Get-MobileDevice*” to fetch all devices in Exchange, thus bypassing the need to loop though all mailboxes using “Get-CASMailbox”. (This was hazardous and time consuming in our environment owing to the number of mailboxes.) I also added a “-sortBy” script, and added some additional logic to handle situations where a device is associated with a user whose mailbox has been deleted.

    Revised script below:

    Script removed: please don’t paste large scripts into comments, it messes with the page layout.

    1. Scott

      Would you happen to be able to post a link to your revised script? It sounds like what I’m looking for right now.

    2. Lee A.

      If you are reading this, please post this revised script. This is exactly what I’m looking for!

  32. Ashish Bachhas

    Is there any way to exclude legacy EAS users while this script executes. I only want report to include Exchange 2013 EAS users and skip all Exchange 2007 EAS users while running. This will save some time as every time it connect to 2K7 mailbox, it gives the following error for them.

    The Get-ActiveSyncDeviceStatistics command that you are trying to run, which is version 15, requires that the target mailbox account is on a Mailbox server that is the same version. The command wasn’t able to process your request because the target mailbox account is on a Mailbox server with version 8

  33. Ezhil

    Perfect script 🙂

  34. Scott

    This is exactly what I was looking for and worked perfect.

    THANK YOU!

  35. Gustavo

    Hi Paul, its error:

    PS C:Scripts> .Get-EASDeviceReport.ps1
    File C:ScriptsGet-EASDeviceReport.ps1 cannot be loaded. The file C:ScriptsGet-EASDeviceReport.ps1 is not digitally
    signed. The script will not execute on the system. Please see “get-help about_signing” for more details..
    At line:1 char:26
    + .Get-EASDeviceReport.ps1 <<<<
    + CategoryInfo : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

    1. Paul Cunningham

      If you do a Google search for that error the solution will be clear to you, and you’ll have learned something new about PowerShell.

  36. Deivid

    Hi Paul, very useful script 🙂 Here is a good version that I’ve adapted to work with EXO as well. Just use -EXO $true in order to get devices from the EXO. Regards!

    Edit: removed script. Please don’t post entire scripts into the comments here, it messes with the page layout.

  37. Tony

    Is there a future update that I can run this against Exchange 365?
    Thanks

  38. Catalin Pascu

    Hello,

    So I tried to use this script but it keeps telling me that: “Warning: no snap-ins have been registered for windows powershell version 2”.

    I checked the Powershell version and it is v 2.0

    Can you help me please?

    This report will be very useful for me 🙂

    Thank you in advance.

    1. Paul Cunningham

      Do you have the Exchange management tools installed on the computer you’re running the script from?

      1. Catalin Pascu

        Well we do not have a physical Exchange server. It is in another country. Can’t it be runed from Windows Power Shell?

        If so, can you please guide me on how I should run the script?

        Sorry if the questions are a little but silly, but this is all quite new to me.

  39. Eduardo

    Hello, would it be possible to add an ADuser information to the CSV?, I want to add the Title of the employe.

    Thanks

  40. Pirkka

    Nice script.

    However, seems like the HasActiveSyncDevicePartnership -property is not always correctly populated.
    I.e. users have it true, even if they do not have AS devices and false if they do.

    1. Paul Cunningham

      I haven’t seen that anywhere myself. Can you see anything that would explain why that is happening in your environment?

      1. Jeremy Bradshaw

        On this note, I’ve seen in our environment as well that the HasActiveSyncDevicePartnership property is not trustworthy. I changed our Get-Mailbox where filter to be:

        where {($_.ActiveSyncAllowedDeviceIds -ne $null) -or ($_.ActiveSyncBlockedDeviceIds -ne $null)}

        The Allowed/Blocked ID’s being there is a tried and tested 100% accurate way.

      2. MSMS MSMS

        I can confirm that on Exchange 2016 we are seeing stale information for HasActiveSyncDevicePartnership. There is a RecalculateHasActiveSyncDevicePartnership switch for Get-CASMailbox in Exchange 2016
        https://technet.microsoft.com/en-us/library/bb124754(v=exchg.160).aspx

        There is also KB article that states that it also happens on Exchange 2013:
        https://support.microsoft.com/en-us/help/3001236/incorrect-output-when-you-run-the-get-casmailbox-cmdlet-to-view-the-hasactivesyncdevicepartnership-attribute

        Best regards

  41. Thomas Bjorseth

    Excellent script. Does just what I want, but there is one thing…

    As it loops through the users, I get the following warning:
    “WARNING: The Get-ActiveSyncDeviceStatistics cmdlet will be removed in a future version of Exchange. Use the Get-MobileDeviceStatistics cmdlet instead.
    If you have any scripts that use the Get-ActiveSyncDeviceStatistics cmdlet, update them to use the Get-MobileDeviceStatistics cmdlet. For more infor
    mation, see http://go.microsoft.com/fwlink/p/?LinkId=254711.”

    It appears that the cmdlet that is used to create the report is disappearing sometime in the future. The script still works, but for how long?

    1. Paul Cunningham

      One day, in a future version of Exchange, the cmdlet will be removed. Until then the script uses the cmdlet that works on both Exchange 2010 and 2013.

    2. roy

      You could just change Get-ActiveSyncDeviceStatistics cmdlet with Get-MobileDeviceStatistics in the script (as long as you are on Exchange 2013).

  42. Josué López

    Hi Paul,

    I have a doubt, is there a way to configure this script to run in the Task Scheduler?

    I was trying to run the script in the Task Scheduler of Windows but i can´t make it work to send me and email (Only when I run through windows scheduler), if i run the script throught powershell everything is ok.

    Thank you.

    Regards.

  43. Sven

    I try to execute the script and got the message that “..is not digitally signed…”

    My ExecutionPolicy is set to RemoteSigned. The ExchangeEnvironmentReport script is working fine.

    Do I have to set it to “Unrestricted”?

    Sven

  44. Sabir

    Hi Paul,

    Thanks for the article, as you mentioned in the fb post you shared can you please tell, if we take the report which tab shows that the users have connected to their mailbox with the app.”

    ” With all the excitement and concerns about Outlook for iOS and Android remember you can use my Get-EASDeviceReport.ps1 script to find out which of your users has connected to their mailbox with the app.”

    Thank you

    1. Paul Cunningham

      In the CSV file the DeviceModel, DeviceType, DeviceFriendlyName, and DeviceOS will all show you that.

    2. Rosario Carcò

      I scheduled the Script to run every night and I can see new users having made an attempt. SyncAge displays NEVER and LastSyncAttemptTime and LastSuccessSync are empty.

      I modified the if clause in the script to filter out only the new iOS-Android users/devices and inverted to show syncAge LESS than the given 30 days to get only users/devices who connected in the last few days, like this:

      if ($EASDevice.DeviceModel -like ‘*Outlook for iOS and Android*’ -and ($syncAge -le $Age -or $syncAge -eq “Never”))

      Of course you could omit the whole syncAge part if you are only intrested in tracking the iOS-Android users that started only recently as the app was released.

      Rosario

  45. Chris Lehr

    Great script. If you modify the Initialize section to this (or replace it with the EXO part) it works with Exchange Online!

    $selectorg = Read-Host ‘enter 1 for Exchange Online and 2 for Exchange on premise’

    if ($selectorg -eq 1)
    {
    $c = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $c -Authentication Basic -AllowRedirection
    import-pssession $session
    } else {

    #Add Exchange 2010/2013 snapin if not already loaded in the PowerShell session
    if (!(Get-PSSnapin | where {$_.Name -eq “Microsoft.Exchange.Management.PowerShell.E2010”}))
    {
    try
    {
    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction STOP
    }
    catch
    {
    #Snapin was not loaded
    Write-Warning $_.Exception.Message
    EXIT
    }
    . $env:ExchangeInstallPathbinRemoteExchange.ps1
    Connect-ExchangeServer -auto -AllowClobber
    }
    }

  46. Doug

    I’m missing something–where is the download link for Get-EASDeviceReport.ps1?

  47. Gabriel

    Thx

  48. Mustansir

    The script worked like it says. Only thing I was wondering, whether we can get the GUID of the ActiveSync device also in the output. And secondly , how to pipe this output to a script which would inturn remove the activesync devices based upon the GUID’s we select from a CSV or text file. Any assistance in this regard would be very helpful

  49. Anthony

    Hi Paul,

    We have a CAS Array with 5 Servers behind a Cisco Content Switch.

    Can this script show which CAS server the device is syncing with? We’re running Exchange 2007.

  50. Lasantha

    Very useful script. One thing I noticed that soon after I ran the script, there were 47 events with the ID 1033 in the application log. One event for example read as follows,

    The setting EventQueuePollingInterval in the Web.Config file was not valid. The previous value was null and has been changed to 2.

    Has anyone seen this too? We are on Exchange 2010 SP3 with latest CU.

    Thanks

  51. David

    Never mind. I found it.

    1. Sayeem

      I guess I am blind, didn’t find it yet. Any help?
      Thank you.

      1. Paul Cunningham

        Follow the link in the post to join the Insiders for free. Scripts are available inside the members area.

        1. Sayeem

          Found the script. It looks like a handsome script. By the way it didn’t work in my case as we are running Exchnage 2007 I guess. Please confirm.
          Error Message:
          The Get-ActiveSyncDeviceStatistics command that you are trying to run, which is version 14, requires that the target mailbox account is on a
          Mailbox server that is the same version. The command wasn’t able to process your request because the target mailbox account is on a Mailbox
          server with version 8.

  52. David

    Ok. I feel like a complete idiot but I really want to see this script. I signed up and signed in, but still do not see a link to download the scipt.
    Thanks very much.

  53. Pivattos

    Very very very Nice!!! Wonderfull!!! Save My Work!!!! Tks!!!

  54. Tony B

    We are in the process of implementing an MDM solution and moving all EAS devices to it. I want to run the script to clean up devices that have not connected in xx days, but I also need to skip devices that are enrolled through MDM. When I run the get-activesyncdevice | get-activesyncdevicestastics command, I get an output that shows a column labled DeviceAccessStateReason. The values are “global” for devices connected directly to EAS and “individual” for devices managed through the MDM.

    Is there a way to modify the script to only find devices that have not connected xx days and have DeviceAccessStateReason=global?

    Thanks,
    Tony

    1. Paul Cunningham

      Sure. Anything is possible with PowerShell. Or you could just open the CSV file in Excel and do some filtering of the data in there.

  55. Morgan

    Great script, I also had the same question as Mark if you can pull the MAC address attribute from async.

  56. Gavin Connell-Otten

    Scrap that question, figured it out. I just commented out the Exchange snap in check stuff and made sure I already had the cmdlets loaded in my remote powershell session. Works well for Office 365, thanks!

  57. Gavin Connell-Otten

    Hi Paul, nice job dude 🙂

    Any tips for getting this going with Exchange Online (Exch2013)?

    Cheers,

    Gavin

  58. Mark

    Hi Paul,

    I was wondering if there any way to get this report to give information such as MAC address? I see you have device I.D just as I’m trying to create a white list on our wireless connections and wanted to use this for referencing.

    Thanks, Mark

  59. Pradeep

    there are various users which activesync account is enabled and under manage phone option none of the device is appearing due to this i am unable to remove mobile phone partnership or perform a remote wipe.

    and this kind of accounts are not getting captured in this script. Kindly suggest how to capture these kind of activesync enabled users through this script.

    1. Paul Cunningham

      I don’t really understand your question.

      The script reports on ActiveSync device partnerships. It uses Get-CASMailbox to find users with EAS device partnerships. If there is no partnerships for a user then the device won’t be included in the report.

      Are you saying you have devices with no partnership that you’d like to report on?

      1. Pradeep

        Apologies for delay and thanks for responding to my query. Yes i would like to capture even those account whose active sync account is enabled and not yet activated there device. So you under stand correct that i have devices with no partnership that you’d like to report on. Kindly suggest, How we can achieve this.

        1. Paul Cunningham

          All users are enabled for ActiveSync by default.

          And until a device has connected and a partnership has been created, it can’t be reported on.

  60. Marcus

    Hi Paul,

    I figured out what the problem is. The report sends a .CSV attachment which if you open directly by double clicking it from within Outlook Excel will open and truncate the long numbers. You have to open Excel then import the CSV, when you get to step 3 you need to highlight the DeviceID column and change it from General to Text. This will stop Excel from automatically truncating long numbers.

    Thanks

  61. Marcus

    Hi Paul,

    First of all thank you very much for all the great scripts that you put out for us, it really does make our lives that much easier.
    When I run the script a few of my DeviceID’s are been truncated, i.e. the DeviceID appears as 5.1535E+29. Is there a way around this?

    Thanks

    1. Paul Cunningham

      Not sure since I’ve never run into that issue. When you look at those devices do they have really long device IDs or something like that?

  62. RC

    Hi,

    Is there anyway we could get the script to show the current time versus UTC and maybe a sort on the most recently sync’d device?

    Thank you a ton!

    Ryan

    1. Paul Cunningham

      The scripts are free to customize. Have you looked at the code already?

  63. Red

    Hi,
    great, as usual, but not working in a multidomain environment. I need something like “Set-AdServerSettings -ViewEntireForest $True” in the shell initialization and “-ResultSize unlimited” in the get-ActiveSyncDevice” but I really don’t know how to do the trick.
    Regards.

    Red.

    1. Paul Cunningham

      There’s no trick. Have you tried making those changes you’ve identified?

  64. Mykul

    Paul,
    Just to clarify, when adding the -Age 30 to the script with csv output, the Sync Age column is how many days ago the device last synced?

    1. Paul Cunningham

      Yes. If you used -Age 30 that would report on devices that haven’t attempted to sync in 30 or more days.

      Basically it is a way to exclude active devices from the report and only show inactive devices.

      1. Mykul

        Thanks!

  65. Paul Cunningham

    FYI all I’ve uploaded V1.02 which has that UTF8 encoding fix and also fixes another minor bug with the file path for the CSV file.

  66. Shane Bryan

    Ahh never mind, the downloads are on another page. Sorry all :-p

  67. Shane Bryan

    Hmm, I’m logged in but I can’t get the download link for the script to appear. When I click on the “Join Here it’s free” link it takes me to a page that says “Welcome, you’re already logged in”.

  68. Stuart Law

    Hi Paul,
    Is there a way to run this on individual servers?
    In the middle of a 2007 – 2010 migration so the mailboxes are split.

    It comes back with the ‘You must use V14’ error.

  69. achelous

    nice work!

    just a sidenote, had to add “-encoding unicode” to export-csv for our norwegian special chars, ÆØÅ

      1. Abraham Lincoln

        We actually added “-Encoding UTF8” in order to correctly show display names with accent marks and tildes. Great script, thanks!

  70. Martin Eddy

    It works like it says on the box.

    1. Al Dion

      Great job and works perfectly.

Leave a Reply