Solved

Exchange 2010 schema information

Posted on 2011-03-17
4
564 Views
Last Modified: 2012-06-27
Hi Experts.

Using Powershell or c# I want to be able to get type information for Exchange attributes.
For example I would like to get a list of properties that are available on a mailbox and the type of that property before I actually get information for a particular mailbox.

Can anyone tell me how to do that?

Thanks.
0
Comment
Question by:Hagley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
soostibi earned 500 total points
ID: 35155463
This is not an easy question. Unfortunately there is no such object in AD as Mailbox. Normal user accounts have Exchange attributes, that relate to mailbox information. Some of these attributes are already in the schema, some come when we extend the schema for Exchange.
Some mailbox related attributes have a name starting with 'msExch-', some don't. So, to filter only Exchange related attributes is not an easy thing.

Here is a code that selects all the attributes starting with "msExch" only. To run this, you have to have ActiveDirectory module imported.
$syntaxhash = @{
'2.5.5.8-1' =	'Boolean'
'2.5.5.9-2' =	'Integer'
'2.5.5.10-4' =	'String(Octet)'
'2.5.5.17-4' =	'String(Sid)'
'2.5.5.2-6' =	'String(Object-Identifier)'
'2.5.5.9-10' =	'Enumeration'
'2.5.5.6-18' =	'String(Numeric)'
'2.5.5.5-19' =	'String(Printable)'
'2.5.5.4-20' =	'CaseIgnoreString(Teletex)'
'2.5.5.5-22' =	'String(IA5)'
'2.5.5.11-23' =	'String(UTC-Time)'
'2.5.5.11-24' =	'String(Generalized-Time)'
'2.5.5.3-27' =	'Case-Sensitive String'
'2.5.5.12-64' =	'String(Unicode)'
'2.5.5.16-65' =	'LargeInteger'
'2.5.5.15-66' =	'String(NT-Sec-Desc)'
'2.5.5.1-127' =	'Object(DN-DN)'
'2.5.5.7-127' =	'Object(DN-Binary)'
'2.5.5.13-127' =	'Object(Presentation-Address)'
'2.5.5.14-127' =	'Object(DN-String)'
'2.5.5.0-' =	'Undefined'
}

filter get-systemAuxiliaryClass 
{
    $ado = Get-ADObject -Properties maycontain, systemmaycontain, systemAuxiliaryClass -Filter {objectClass -eq 'ClassSchema' -and lDAPDisplayName -eq $_} `
        -SearchBase ((Get-ADForest).partitionscontainer -replace "partitions","schema")
    if($ado.systemAuxiliaryClass){
        $ado.systemAuxiliaryClass | get-systemAuxiliaryClass
    }
    $ado 
}

"user" | get-systemAuxiliaryClass | %{
    $_.maycontain, $_.systemmaycontain 
} | %{$_} | ?{$_ -like "msExch*"} | %{
    Get-ADObject -Properties * -Filter {objectClass -eq 'attributeSchema' -and lDAPDisplayName -eq $_} -SearchBase ((Get-ADForest).partitionscontainer -replace "partitions","schema")
} | ft name, @{n="syntax";e={$syntaxhash.($_.attributesyntax +"-"+$_.oMSyntax)}}, ismemberofpartialattributeset, issinglevalued -AutoSize

Open in new window

0
 
LVL 13

Expert Comment

by:soostibi
ID: 35155472
Of course, this is a PowerShell code.
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 35687983
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
how to add IIS SMTP to handle application/Scanner relays into office 365.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question