strVariabl = "OU=Pupils and Classes,OU=Allerton Primary School,OU=School Email" '***************************************************************************** '***************************************************************************** '***************************************************************************** '**Start Encode** dim nome dim Commento dim objMailbox ParseCommandLine() wscript.echo nome Const ADS_PROPERTY_APPEND = 3 Set objRootDSE = GetObject("LDAP://rootDSE") strFissa = strVariabl & "," & objRootDSE.Get("defaultNamingContext") wscript.echo strFissa Set objGroup = GetObject _ ("LDAP://"& strFissa) Const ADS_GROUP_TYPE_GLOBAL_GROUP = &h2 Set objGroup = objGroup.Create ("group", "CN=" & nome) objGroup.Put "sAMAccountName", nome ObjGroup.Put "Description", commento objGroup.Put "groupType", ADS_GROUP_TYPE_GLOBAL_GROUP objGroup.MailEnable objGroup.SetInfo Set objMailbox = objgroup objMailbox.Create "Mailbox","LDAP://CN="& nome & ","& strVariabl &",CN=InformationStore,CN=exchange server-MAIL,CN=Servers,CN=primaryt,CN=Administrative Groups,CN=my company,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=primaryt,DC=co,DC=uk" objMailbox.SetInfo Sub ParseCommandLine() Dim vArgs set vArgs = WScript.Arguments if vArgs.Count <> 2 then DisplayUsage() Else nome = vArgs(0) commento = vArgs(1) End if End Sub