Sure, just do a standard bind with vbscript LDAP provider and ask for the
attribute...
partpath="cn=partitions,cn=configuration,dc=domain,dc=com"
set o=getobject("LDAP://"&partpath)
upns=o.getex("upnsuffixes")
foreach suffix in upns
wscript.echo suffix
next
In production I would add error checking in case there are no alternative upn
suffixes and I would dynamically look up the configuration partition. This is
all things that you can see how to do from the TechNet scriptcenter. If you
intend to do much ad scripting I recommend you pick up the Activw Directory
Cookbook.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.