locked
Display a list of active sync devices -creating an exclusion for Android-Validate RRS feed

  • Question

  • We have a small script that returns all of the active sync devices that are registered with our exchange server -that have not communicated in 30 days.  We have noticed that some of the newer android OS return a second Android OS with a description of Airsync-Android-Validate.  This only lists the date the decive was actived on our server and doesn't show the current sync information.  is there a way to filter our results (I'll attach the script we use) to change the out put results if not like validate? this is the script we are using;

    # get-phones
    # generates a report of any ActiveSync device partnerships
    # that have not synched in 30 days or more

    $mbs=@()
    $deadphones = @()
    $today = Get-Date
    $shutoffdate = (Get-Date).adddays(-30)
    $recips=get-recipient -resultsize unlimited -recipienttypedetails UserMailbox |sort displayname
    foreach($recip in $recips)
    {
    $mymb = $recip.distinguishedname
    $mbs += ,$mymb
    }
    $cas=$mbs |get-casmailbox |where {$_.activesyncenabled -eq $TRUE}
    for($x=0;$x -lt $cas.count;$x++)
     {
     $myphones = @(get-activesyncdevicestatistics -mailbox $cas[$x].name)
     IF ($myphones.count -gt 0)
        {
     for($y=0;$y -lt $myphones.count;$y++)
      {
      $whendidyoulasttalktome = $myphones[$y].lastsuccesssync
      IF($whendidyoulasttalktome -le $shutoffdate)
        {
        $deadphone = new-object system.object
        $deadphone |Add-Member -membertype NoteProperty  -Name "User Name" -Value $cas[$x].name
        $deadphone |Add-Member -membertype NoteProperty  -Name "Phone" -Value $myphones[$y].identity
        $deadphone |Add-Member -membertype NoteProperty  -Name "Last Sync Date" -Value $whendidyoulasttalktome
        $deadphones += ,$deadphone
        }
      ELSE{$stillgood++}
      }
     }
     ELSE {$nophones++}
     }
     $deadphones |Out-GridView

    Wednesday, August 3, 2011 9:28 PM

Answers

All replies

  • Hi Tom,

     

    For this issue, please use the  following link which would be the most relevant forum for you:

     

    Exchange Development forum:

    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads

     

    Thanks,

     

    Evan

    Tuesday, August 9, 2011 8:14 AM
    Moderator
  • How about chaning the .lastsuccesssync to .LastSyncAttemptTime ?

    then you wil get a time refeerence when device tried to sync instead of when it last successfully synced.

     


    lasse at humandata dot se, http://anewmessagehasarrived.blogspot.com
    Tuesday, August 9, 2011 8:43 AM