The Get-EASDeviceReport.ps1 PowerShell script has been updated to V1.01.
This update includes the following changes:
- Added SMTP parameters for emailing the report
- Added an “age” parameter to set a threshold for last sync age
- Numerous bug fixes and improvements
So now you can, for example, run a report that shows ActiveSync devices that have not attempted sync in the last 30 days, and have that report emailed to you as a CSV file.
See more details and download the script here.
I have 2 domains, I am wondering if it can list out the domains the users are in?
Almost anything is possible with PowerShell. Have you looked at the script code, the cmdlets that it’s running, and seen whether those cmdlets can return other properties that you’re interested in adding to your report?
oh, I didn’t mention, powershell scripting is not my strong suit and confuses me… 🙂
Fair enough, I’ve just updated the script so that it includes the OrganizationalUnit attribute for the mailbox user. See if that helps with your scenario.
And for bonus points, you can see the changes that were made in this commit, which might help you with customizing scripts in future.
Finally found it; but not through any link that was posted in any of the articles.
Had to go to Member Tools/Resources to find it.
You may want to make it more clear exactly how to obtain the script; I noticed other people wondering the same thing.
It turned out to not be “hard” to find necessarily, but it was not intuitive in the least.
Where is the link to download the script?
It’s got to be here, I see other people commenting on it..so they must have obtained it; but I’m just not seeing it anywhere on the page.
The “download here” link just takes you to another page:
And I don’t see any link on that page either.
Great script. Is there a way to get a list of devices that have only syncd in the last 30 days?
Set the -Age to zero (so it reports all devices) and use Excel to filter the results.
Or, modify the script to return results less than 30 instead of greater than 30.
Yeah your right.. but i managed to work it with .addhours and a little modification on your script..
Thanks Anyway Paul..
very good script as i said before
Hey Paul, very nice script.
I’m probably getting the date without time zone (is that correct??)
how should i change to see the correct hours on my LastSyncAttemptTime and LastSuccessSync fields??
Correct, the dates are in UTC. Wouldn’t be hard to change them to a local time, though what is “local” to the machine running the script may not be local to the device itself (eg global orgs).
When you’re reporting on +30 day aged devices like I usually am it doesn’t really matter if the timestamp is out by a few hours.
Is there any negative affect (Server degradation, Etc.) with having a few old ActiveSync devices still associated to the users mailbox? Will the mailbox still try to sync to a device that is no longer active?
The mailbox doesn’t initiate any synchronization to a device.
Mailboxes that accumulate multiple device associations may breach the default limit of 10 and then the user would be unable to connect any new devices until that is resolved.
Some organizations also remove unused devices for security reasons.
Thank you for my Birthday present..
I like to have a report of all devices with ‘Less than or equal’, so I updated line 152 and any text with ‘greater’ and change to ‘less’
if ($syncAge -le $Age -or $syncAge -eq “Never”)
Is it possible to also have a funtion to also remove Stale devices after the reporting including LastSyncAttempt -eq $Null with $_.FirstSyncTime -gt (Get-Date).AddMonths(-3)}
As a general rule I don’t ship scripts that automatically make potentially harmful changes 😉
With the CSV report the script produces it would be pretty simple to import that into a command or script that runs the remove-activesyncdevice cmdlet. Personally I would always want to eyeball the CSV file first.