locked
export list of active sync users RRS feed

  • Question

  • hello is there a powershell cmdlet i can use to export a list of all users who have an active sync device associated with their account?
    -chaz
    Tuesday, January 17, 2012 9:50 PM

Answers

  • Hi,

    if you want to get all users and their associated Mobile Device OS you are able to use this Powerrshell code:

    $mailboxes=get-mailbox
    foreach ($mailbox in $mailboxes) {
       $device= (get-activesyncdevicestatistics -mailbox
       $mailbox.alias).devicetype
       write-host "$mailbox.alias `t $device"
    }
    
    


    regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
    • Proposed as answer by Boby Thomas Wednesday, January 18, 2012 9:43 AM
    • Marked as answer by chaz1121 Thursday, January 19, 2012 5:28 PM
    Tuesday, January 17, 2012 9:58 PM

All replies

  • Hi,

    if you want to get all users and their associated Mobile Device OS you are able to use this Powerrshell code:

    $mailboxes=get-mailbox
    foreach ($mailbox in $mailboxes) {
       $device= (get-activesyncdevicestatistics -mailbox
       $mailbox.alias).devicetype
       write-host "$mailbox.alias `t $device"
    }
    
    


    regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
    • Proposed as answer by Boby Thomas Wednesday, January 18, 2012 9:43 AM
    • Marked as answer by chaz1121 Thursday, January 19, 2012 5:28 PM
    Tuesday, January 17, 2012 9:58 PM
  • Hi,

    could I help you? Or have you got updates on this issue? If your question is answered it would be nice if you mark it accordingsly. This may help others who have got the same or a similar question.

    Thanks a lot in advance

    Kind regards

      Thomas

     

     


    regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
    Wednesday, January 18, 2012 8:12 PM
  • thanks that did the trick! greatly appreciate the response. 

     

    cheers. 


    -chaz
    Thursday, January 19, 2012 5:28 PM
  • Simply because of the throttling policies & whether or not  the mailbox is a recipient or another mailbox  type - wouldn't it be better to start by pulling licensed users & to also accouint for if the number exceeds 1000 ?

    Example:

    Get-MsolUser | Where-Object {$_.isLicensed -like "TRUE"}

    $mailboxes = Get-Mailbox -resultsize unlimited | Where-Object {$_.RecipientType -like "UserMailbox"}

    • Edited by BrianTGrant Wednesday, August 14, 2013 4:56 PM minor edit
    Wednesday, August 14, 2013 4:46 PM