TheTAZZone - Internet Chaos

create a new user in AD as well as a new mailbox on an Exchange server

ORIGINALLY POSTED BY TALEN FOR THETAZZONE/TAZFORUM HERE

Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to use, retain, and publish submitted work within it’s Network

Please refer to the original post as not all the script may be visible here.

This script should create a new user in AD as well as a new mailbox on an Exchange server. Use this one with caution, I haven’t really tested it yet.

Code: Select all
Option Explicit

Dim RootDSE, myDomain
'-------------------------------------------------------------------------------
Set RootDSE = GetObject("LDAP://RootDSE")
Set myDomain = GetObject("LDAP://" & RootDSE.Get("DefaultNamingContext"))

myDomainADSPath = myDomain.ADSPath      ' LDAP://DC=myDomain,DC=com
myDomainPath = MID(myDomain.ADSPath,8)   'DC=myDomain,DC=com

strTitle = "New User with Exchange Mailbox"
strUserName = InputBox("What is the name of the new user?", strTitle, "John Doe")
strSAM = InputBox("What will the be the user's SAMAccount name?", strTitle, "JDoe")

Leave a Reply

Your email address will not be published. Required fields are marked *

Advertise

If you'd like to advertise on The Mutt ( aka TheTAZZone.com ) feel free to contact us at: administration[at]thetazzone.com

TheTAZZone is a non-commercial entity. We do not sell any products or services ourselves. Our revenue comes from advertising and donations only.

We appreciate your support! Your advertising revenue ( or donations ) helps us to continue to upgrade, improve, and offset the costs of maintaining this site.

Donations can be made through the page ' Donate '.