+ Post New Thread
Results 1 to 5 of 5
Cloud Services Thread, Office 365 - Filter mailbox users by department or title in Technical; Hi, I must be having a bad day but i cannot figure out or find the information on how i ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,103
    Thank Post
    891
    Thanked 1,750 Times in 1,509 Posts
    Blog Entries
    12
    Rep Power
    457

    Office 365 - Filter mailbox users by department or title

    Hi,

    I must be having a bad day but i cannot figure out or find the information on how i can use get-mailbox but filter it down bases on department or title.
    I want to set some options on some mailboxes.

    Thanks

  2. #2

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,196
    Thank Post
    404
    Thanked 627 Times in 573 Posts
    Rep Power
    182

  3. #3

    EduTech's Avatar
    Join Date
    Aug 2007
    Location
    Reading
    Posts
    5,070
    Thank Post
    160
    Thanked 927 Times in 729 Posts
    Blog Entries
    3
    Rep Power
    273
    Hi,

    I do not believe department is an attribute shown in the Get-Mailbox output, but the following should help. Department is shown in Get-MsolUser.

    This Command will allow you to bring back all the users whom have X value in the Office Attribute.

    get-mailbox | Where {$_.Office -ilike "MyOffice"}

    This Command will allow you to bring back all the users whom have X value in the Department Attribute.

    Get-MsolUser| Where {$_.Department -ilike "MyDepartment"}

    I hope that helps,
    James.

  4. Thanks to EduTech from:

    TheScarfedOne (28th July 2014)

  5. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,103
    Thank Post
    891
    Thanked 1,750 Times in 1,509 Posts
    Blog Entries
    12
    Rep Power
    457
    Quote Originally Posted by EduTech View Post
    Hi,

    I do not believe department is an attribute shown in the Get-Mailbox output, but the following should help. Department is shown in Get-MsolUser.

    This Command will allow you to bring back all the users whom have X value in the Office Attribute.

    get-mailbox | Where {$_.Office -ilike "MyOffice"}

    This Command will allow you to bring back all the users whom have X value in the Department Attribute.

    Get-MsolUser| Where {$_.Department -ilike "MyDepartment"}

    I hope that helps,
    James.

    But that would then pickup users who do not have mailboxes wouldn't it?

    Thanks
    Last edited by FN-GM; 28th July 2014 at 08:37 AM.

  6. #5

    EduTech's Avatar
    Join Date
    Aug 2007
    Location
    Reading
    Posts
    5,070
    Thank Post
    160
    Thanked 927 Times in 729 Posts
    Blog Entries
    3
    Rep Power
    273
    Quote Originally Posted by FN-GM View Post
    But that would then pickup users who do not have mailboxes wouldn't it?

    Thanks
    If you were to run Get-MsolUser that indeed is the case. If you do want to use Department then in order to get ONLY Mailboxes back it would need to be more specific i.e. What License SKU they have for example.

    You could use the following, but then this assumes that the license assigned to all users includes Exchange.

    Get-MsolUser | Where {($_.Department -ilike "GBS") -and ($_.IsLicensed)}

    Thanks,
    James.
    Last edited by EduTech; 28th July 2014 at 12:49 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. Office 365 OWA error - user unable to access mailbox
    By mb2k01 in forum Cloud Services
    Replies: 33
    Last Post: 10th July 2014, 03:41 PM
  2. [Office 365] - Shared mailbox error
    By Marshall_IT in forum Cloud Services
    Replies: 0
    Last Post: 16th April 2014, 10:54 AM
  3. Replies: 17
    Last Post: 14th October 2013, 02:30 PM
  4. Office 365 - Shared Mailbox Address Book
    By Cache in forum Cloud Services
    Replies: 7
    Last Post: 20th July 2013, 04:16 PM
  5. Office 365 - Modifying mailbox properties
    By Tallwood_6 in forum Cloud Services
    Replies: 4
    Last Post: 4th July 2013, 11:10 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •