Retrieve custom attribute values using Exchange Management Shell
I need to be able to retrieve a custom attribute values for a given mailbox. I can run Get-Mailbox -Identity "Mailbox_Name" | Format-List CustomAttribute5 to retrieve custom attributes but that retrieves the attribute in a formatted list and I just want the attribute value returned. I assume there must be a way to do this with the get-Mailbox cmdlet but I haven't found a way so far. Any ideas? Thanks in advance! Matthew
June 29th, 2012 4:22pm

hi, here is the technet article that describes the custom attributes in Exchange 2010 http://technet.microsoft.com/en-us/library/ee423541.aspx The Active Directory attributes are called: ms-Exch-Extension-Attribute-16 to 45 ms-exch-extension-custom-attribute-1 to 5 Hope this helps. kind regards Thomasregards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2012 6:32pm

hi, here is the technet article that describes the custom attributes in Exchange 2010 http://technet.microsoft.com/en-us/library/ee423541.aspx The Active Directory attributes are called: ms-Exch-Extension-Attribute-16 to 45 ms-exch-extension-custom-attribute-1 to 5 Hope this helps. kind regards Thomasregards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
June 29th, 2012 6:39pm

Hi Matthew, See if this gives you what you are looking for: Get-mailbox "Mailbox User" | ForEach-Object {$_.customattribute5} Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2012 2:27pm

if you want a specific attribute rather than all then we can modify you PS command slightly. Get-Mailbox -Identity "Mailbox_Name" | select CustomAttribute5 That will purely give back that attribute without anything else. OliverOliver Moazzezi | Exchange MVP, MCSA:M, MCITP:Exchange 2010, BA (Hons) Anim | http://www.exchange2010.com | http://www.cobweb.com | http://twitter.com/OliverMoazzezi
June 30th, 2012 8:22pm

Hi, any updates? If your question is answered it would be nice if you mark it accordingly because this may help others who have got the same or a similar question. regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2012 3:19pm

If you only want the attribute returned, with no other formatting to the screen, try this: (get-mailbox jsmith).customattribute5 Mike Crowley | MVP My Blog -- Planet Technologies
July 3rd, 2012 10:49am

If you only want the attribute returned, with no other formatting to the screen, try this: (get-mailbox jsmith).customattribute5 Mike Crowley | MVP My Blog -- Planet Technologies
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2012 10:51am

Thanks Mike! That is exactly what I was looking for. I knew there was a way to retrieve a single unformated attribute from get-mailbox, but didn't know the correct syntax to retrieve it. Matthew
July 9th, 2012 4:01pm

FWIW, Martina's approach produces a similiar output. Mike Crowley | MVP My Blog -- Planet Technologies
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2012 5:34pm

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

Other recent topics Other recent topics