How to search/filter managed devices via criteria