Glen Scales [MVP]
Guest
|
Posted:
Mon Sep 26, 2005 7:05 am Post subject:
Re: Exchange 2003 - programmatically set "Filter Recipients |
|
|
This setting is held in Active Directory I don't believe its in the
Metabase. The property itself is called "msExchRecipTurfListOptions" and it
located in the configuration partition in Active Directory on the Default
Message Filter object. To show the status via a script would look like (note
you still have to enable recipient filtering on each connector for this to
apply)
set conn = createobject("ADODB.Connection")
set com = createobject("ADODB.Command")
Set iAdRootDSE = GetObject("LDAP://RootDSE")
strNameingContext = iAdRootDSE.Get("configurationNamingContext")
Conn.Provider = "ADsDSOObject"
Conn.Open "ADs Provider"
gsQuery = "<LDAP://" & strNameingContext &
">;(objectCategory=msExchSmtpTurfList);name,msExchRecipTurfListOptions,distinguishedName;subtree"
Com.ActiveConnection = Conn
Com.CommandText = gsQuery
Set Rs = Com.Execute
While Not Rs.EOF
strconfcont = "LDAP://" & rs.fields("distinguishedName")
set ccConfig = getobject(strconfcont)
if ccConfig.msExchRecipTurfListOptions = 1 then
wscript.echo "Filter Recipients who are not in Active Directory is
Enabled"
else
wscript.echo "Filter Recipients who are not in Active Directory is Not
Enabled"
end if
rs.movenext
wend
Cheers
Glen
"Exchange" <exchange@microsoft.com> wrote in message
news:eGOgGNFwFHA.2556@TK2MSFTNGP15.phx.gbl...
| Quote: | Is this parameter in the IIS Metabase? If so, where? If not, where is it?
I've been looking all over for it and am going nuts trying to find it!
|
|
|