Overview older than 30 Days:
Get-MobileDevice | get-mobiledevicestatistics | where {$_.lastsyncattempttime -lt (get-date).adddays(-30)} | out-gridview
Delete active sync devices older then 30 days
Get-MobileDevice | Get-MobileDeviceStatistics | where {$_.LastSyncAttemptTime -lt (get-date).adddays(-30)} | remove-mobiledevice -Confirm:$false