locked
Management Shell query RRS feed

  • Question

  • Exchange 2007. Using a query to get members of a DL, I can get everything I need except middle initials. Here is an example of the query.

     Get-DistributionGroupMember –identity “My DL” | Select-Object name,lastname,firstname,Initials,primarysmtpaddress,phone,Title

    Any ideas?

    Thanks

    Tuesday, January 3, 2012 4:09 PM

Answers

  • Hi,
    You can't get the initials from get-mailbox, but this will work:

    Get-DistributionGroupMember –identity “My DL” |get-user| Select-Object name,lastname,firstname,Initials,primarysmtpaddress,phone,Title
    Martina Miskovic - http://www.nic2012.com/
    • Marked as answer by akg414s Tuesday, January 3, 2012 6:46 PM
    Tuesday, January 3, 2012 4:33 PM

All replies

  • Hi,
    You can't get the initials from get-mailbox, but this will work:

    Get-DistributionGroupMember –identity “My DL” |get-user| Select-Object name,lastname,firstname,Initials,primarysmtpaddress,phone,Title
    Martina Miskovic - http://www.nic2012.com/
    • Marked as answer by akg414s Tuesday, January 3, 2012 6:46 PM
    Tuesday, January 3, 2012 4:33 PM
  • Thanks Martina. Worked great!
    Tuesday, January 3, 2012 6:46 PM
  • On Tue, 3 Jan 2012 16:33:47 +0000, Martina_Miskovic wrote:
     
    >Hi, You can't get the initials from get-mailbox, but this will work: Get-DistributionGroupMember ?identity ?My DL? |get-user| Select-Object name,lastname,firstname,Initials,primarysmtpaddress,phone,Title
     
    Have you ever noticed how often the "Initials" property is (mis)used
    for the initial of the person's middle name instead of their full set
    of initialS? Just askin'. :-D
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    Tuesday, January 3, 2012 10:43 PM
  • Spoke to soon on this one. Using the get-user I can no longer get the email address.

    Is there anywhere in the user account properties to put a middle initial?

    What would be an example of a need for full initials?

    Thursday, January 19, 2012 5:57 PM
  • On Thu, 19 Jan 2012 17:57:57 +0000, akg414s wrote:
     
    >Spoke to soon on this one. Using the get-user I can no longer get the email address.
     
    There's a WindowsEmailAddress property for the user. But that's not
    what Exchange uses to manage e-mail. Exchange uses the contents of the
    proxyAddresses property (in Powershell that woulf be EmailAddresses,
    but you'd only find that on objects that can receive messages).
     
    >Is there anywhere in the user account properties to put a middle initial?
     
    Yes. The "initials" property is what mode people use, even though its
    intended purpose is to store the person's intitials (e.g. "John D.
    Doe" would have the Initials property populated with "JDD")
     
    >What would be an example of a need for full initials?
     
    Whatever you wanted to use them for.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    Thursday, January 19, 2012 10:30 PM