troubleshooting Question

Exchange 2016 on premise - remove sync devices older than 30 days

Avatar of James Clydesdale
James ClydesdaleFlag for United Kingdom of Great Britain and Northern Ireland asked on
PowershellExchangeWindows Server 2016
2 Comments1 Solution10 ViewsLast Modified:

Hi guys, 


I am trying to run a command in exchange PowerShell to remove active sync devices older than 30 days from our on premise Exchange 2016 server. 


I am using the below command:


Get-MobileDevice -result unlimited| Get-MobileDeviceStatistics| where {$_.LastSuccessSync -lt (Get-Date).AddDays(-30)}


However, when I run this, it seems to just sit there and get stuck and not run anything. I have tried to leave overnight but still nothing. We only have around 150 devices to remove, so not a massive amount.


Any ideas to why this isn't working/other scripts to run?


Any help appreciated.


Thanks

ASKER CERTIFIED SOLUTION
Scott Silva
Network Administrator

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 2 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 2 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004