Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripting Active Directory and Exchange account

Status
Not open for further replies.

JamesonJ

MIS
Oct 22, 2002
13
US
I would like to script, through VB script, the creation of accounts in Active Directory\Windows 2000 and mailboxes in Exchange 5.5 and 2000. I would appreciate if anyone could give me a good starting point for this. Any help would be greatly appreciated.
Thanks for your help!!!
 
There is a big difference between Exchange 5.5 and 2000 in the creation of mail accounts, I have two example scripts from a manual I purchased, I would be more than happy to email them to you, if you want them email me and I will forward them on.

stevefriday@hotmail.com


Regards
Steve Friday
 
As I have just posted the 5.5 script see thread thread329-375125

here is the Exchange 2000 script again thanks must go to Stein Borge for an excellent book ISBN 1-893115-67-4

'create a Exchange 2000 mailbox
Dim strServer, strDomain, strOrganization, strAdminGroup
Dim strStorageGroup, strStoreName
Dim objPerson, objMailbox
strServer = "Odin "
strDomain = "acme.com"
strOrganization = "acme"
strAdminGroup = "First Administrative Group"
strStorageGroup = "First Storage Group"
strStoreName = "Mailbox Store (Odin)"

'get a user object from Active Directory to create mailbox for
Set objMailbox = GetObject("LDAP://cn=Fred Smith,cn=Users,dc=acme,dc=com")
' create mailbox for specified server
objMailbox.CreateMailbox "LDAP://" & _
strServer & _
"/CN=" & _
strStoreName & _
",CN=" & _
strStorageGroup & ",CN=InformationStore,CN=" & _
strServer & _
",CN=Servers,CN=" & _
strAdminGroup & "," & _
"CN=Administrative Groups,CN=" & _
strOrganization & "," & _
"CN=Microsoft Exchange,CN=Services," & _
"CN=Configuration,dc=acme,dc=com"
objMailbox.SetInfo

Regards
Steve Friday
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top