Anyone know where in Active Directory schema the Email Address Policies are kept?

332 Views Asked by At

For reasons that aren't important in this question, I cannot use the ECP or the Exchange Shell to get the email address policies. I will be using standard PowerShell. I do know the name of the on-prem Exchange Server, but it's totally impossible for me to use any remote connection or plugin to ascertain something that's really easy to get with a mouse.

I'm sure somewhere tucked away in the schema are the email address policies, and with it the default policy assigned.

Does anyone know where this would be? I can't for the life of me find it using ADSIEdit, and can't think of something unique as a search term for PowerShell.

Thank you

1

There are 1 best solutions below

0
Graham J On

Found it

CanonicalName : domain.local/Configuration/Services/Microsoft Exchange/ Domain Exchange/Recipient Policies/

And for PowerShell users:

$configurationNamingContext = ( Get-ADRootDSE ).ConfigurationNamingContext
$msConfig = "CN=Microsoft Exchange,CN=Services,$configurationNamingContext"

$defaultPolicy = Get-ADObject -Filter 'objectClass -eq "msExchRecipientPolicy"' -SearchBase $( 
        $msConfig ) -Properties *