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
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 >>
Our community of experts have been thoroughly vetted for their expertise and industry experience.