Hallo,
Kan iemand mij vertellen hoe ik het volgende script kan aan roepen van uit een command file met een variable. dus iets van cscript addupn [var]
De inhoud van het script komt uit active directory cookbook.
' 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
Kan een van de moderators de titel aanpassen geen moet geef zijn ...sorry
Kan iemand mij vertellen hoe ik het volgende script kan aan roepen van uit een command file met een variable. dus iets van cscript addupn [var]
De inhoud van het script komt uit active directory cookbook.
' 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
Kan een van de moderators de titel aanpassen geen moet geef zijn ...sorry
[ Voor 4% gewijzigd door Verwijderd op 27-03-2007 22:35 ]