Hi All,
Hope someone can help me on this. I've written a script to update an Exchange property in AD. The script works great if I hard code the path to the DistinguishedName of the object.
My problem is I need to determine the FQDN dynamically by searching for another property. Ideally I would like to be able to search starting from the DefaultNamingContext.
OK, so say I have this:
From here I want to search all container objects for one with an attribute:
adminDisplayName="Default SMTP Virtual Server" and return the DistinguishedName for that object.
Can anyone help me? Boss is beathing down my neck and I can't go home till I get this one done.
Thanks in advance,
Mark
[/code]
Hope someone can help me on this. I've written a script to update an Exchange property in AD. The script works great if I hard code the path to the DistinguishedName of the object.
My problem is I need to determine the FQDN dynamically by searching for another property. Ideally I would like to be able to search starting from the DefaultNamingContext.
OK, so say I have this:
Code:
Set objDomain = getObject("LDAP://rootDse")
DomainString = objDomain.Get("DefaultNamingContext")
From here I want to search all container objects for one with an attribute:
adminDisplayName="Default SMTP Virtual Server" and return the DistinguishedName for that object.
Can anyone help me? Boss is beathing down my neck and I can't go home till I get this one done.
Thanks in advance,
Mark
[/code]