Adding new upn suffix (VBScript)
This code can be found in
Chapter 6 of Active Directory Cookbook, 2nd edition
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the VBScript code from this site.
' This VBScript code adds a new UPN suffix.
' ---------------------------------------------------------------
' From the book "Active Directory Cookbook" by Robbie Allen
' ISBN: 0-596-00466-4
' ---------------------------------------------------------------
' ------ SCRIPT CONFIGURATION ------
strNewSuffix = "<NewSuffix>" ' e.g. othercorp.com
strDomain = "<DomainDNSName>" ' e.g. rallencorp.com
' ------ END CONFIGURATION ---------
set objRootDSE = GetObject("LDAP://" & strDomain & "/RootDSE")
set objPartitions = GetObject("LDAP://cn=Partitions," & _
objRootDSE.Get("ConfigurationNamingContext"))
objPartitions.PutEx ADS_PROPERTY_APPEND, "uPNSuffixes", Array(strNewSuffix)
objPartitions.SetInfo
|
This code has been viewed 2123 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|