The approach I take is to use ADU&C to create an account by copying the desired template account. The way we are configured this also kicks off a process that creates the exchange mailbox.
Once the account exists, I then launch a vbscript from a taskpad icon in MMC that does more extensive processing of the account based on the template. This is because not all of the attributes of interest are copied from the template when it is used to create a new account. This is typically used to fill in the attributes that are common, like the mailing address fields. If the template contains "?={optional default}", the script then uses inputbox to ask the operator what value to use, with the input area pre-filled by the specified default value.
/Al
"Max C" <maxc246[ at ]yahoo.com> wrote in message news:1183739912.064142.228990[ at ]m36g2000hse.googlegroups.com...
[Quoted Text] > I've found a LOT of examples of scripts for creating, and even more > preferable, copying user accounts to create new user accounts. > Unfortunately, every example I've seen hard codes the new user name, > which is of limited use for automation purposes. > > Here's what I'm trying to accomplish with my extremely limited > knowledge of server scripting. When I create a user account, I always > copy one of 3 current template accounts. I choose the template > account based on which location I want the new user in. That way, AD > automatically creates that user's shared drive on the proper server. > That also allows for direct copying of the login script name, which > differs at each location. Since I'm running Exchange 2007, which took > email setup back out of the AD property pages, I now have to go into > the Exchange Management Console and create an email account for the > new user after copying. > > So, I'd like the ability to create a script and pass in some > parameters. In my pie in the sky thinking, it would go something like > this: > > CreateUser /CopyFrom "Template User Account" /UserName "New User > Name" /AdditionalEmailAddresses "address1[ at ]domain.com", > "address2[ at ]domain.com" > > Perhaps it's possible that I wouldn't need the > "AdditionalEmailAddresses" entry if I could figure out how to have > Exchange set those up by default. In our company, when we set up a > new user, Exchange automatically creates "user[ at ]domain.com" I then > have to go in and add "user[ at ]mail.domain.com" and > "user[ at ]exchange.domain.com" > > Anyway, am I asking too much of a script? It just seems to me that > scripts with hard coded user names aren't very helpful. > > Thanks for any info. I'm looking forward to learning from all of you. > > Max. >
|