Help With Script to ID Android users
Hello, The script below will retrieve all phones with Android as the device type but I haven't been able to get it to retrieve all *droid" phones using -like "*droid*" or -contains "*droid*". Any idea what I am missing? Thanks, Robert Get-CASMailbox -ResultSize unlimited -Filter{(HasActive SyncDevicePartnership -eq $true) -AND (name -notlike "cas_*") -AND (name -notlik e "DiscoverysearchMailbox*")} | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox :$_.Identity | Where-Object {$_.devicetype -like "android"} }
April 17th, 2012 3:47pm

Why not something like this? Get-ActiveSyncDevice -Filter {deviceos -like '*android*'} Mike Crowley | MVP My Blog -- Planet Technologies
Free Windows Admin Tool Kit Click here and download it now
April 17th, 2012 5:26pm

Sorry, I should have mentioned that we are using Exchange 2007.
April 17th, 2012 6:17pm

Here we go: Get-CASMailbox -ResultSize unlimited -Filter{(HasActiveSyncDevicePartnership -eq $true) -AND (name -notlike "cas_*") -AND (name -notlik e "DiscoverysearchMailbox*")} | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity | Where-Object {[string]$_.devicetype -like "droid"} } '[string]' and '-like' were the keys. Not sure why [string] was required. Thanks!
Free Windows Admin Tool Kit Click here and download it now
April 17th, 2012 11:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics