User creation from txt file
Hello, I need to create users account from a text file in the Exchange console 2007, E.g:user1user2user3user4user5 The Active Directory team have already created the above users and fill out the custom attribute 2 with "LINUX" for linux account (MailUser) and "EXCHANGE" for Exchange account (MailBox). I would like to generate a script that would automaticaly create the users in the exchange console 2007. Note that when the custom attribute 2 is equal to "EXCHANGE" I would need to have to fill in the correct storage group for each Exchange user. Thank you all in advance for you help. Graig
February 11th, 2010 6:27pm

It sounds like you are actually wanting to mailbox-enable an existing user, not create a new user account.There is a substantial difference between these two things, and potentially painful consequences of not knowing the difference.
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2010 6:50pm

I would like to describe a bit the current process thought the Exch console. It will maybe clarify what type of shell script I need. To create a mail contact from the Exchange console management 2007: I Click on "new mail contact" and select "Existing User" ; search for my user Then I need to enter the Email address; next ; new; finish And the account is created. I would like to create a script to manage the above process from a text file (I can customize the text file as I Which, so I can add info like SamAccountName, Primary SMTP address etc...) Also I would like to do the same with the mailBox creation. In that process I only need to select user + Storage group. If having 1 script is too complicated, I would not mind having 2 scripts, one for the mail contact creation and for mail box creation. I would really appreciate you help.
February 12th, 2010 2:11pm

First step is to create your input file. I wouldn't try to re-invent the wheel using a custom text file for input. Do it up in Excel, and then save it as .csv. Once you have a .csv file and know what the data looks like, use import-csv to bring the data into Powershell for processing.
Free Windows Admin Tool Kit Click here and download it now
February 15th, 2010 4:56pm

It works fine with the below command, in fact I got a csv file from the AD team with the content I wish to get. It allows me to create bunch of user from the csv file. Mailuser account: Shell command import-csv C:\mailuser.csv | foreach {enable-MailUser -identity $_.identity -ExternalEmailAddress $_.ExternalEmailAddress} CSV file content: Identity,ExternalEmailAddress company/UserTest//User1, User1@company.com *********************************************** Mailbox account: Shell command import-csv C:\mailbox.csv | foreach {enable-MailBox -identity $_.identity -PrimarySmtpAddress $_.PrimarySmtpAddress -Database $_.Database} CSV file content: Identity,PrimarySmtpAddress,Database cmopany/UserTest//UserExchange, UserExchange@cmopany.com, DATABASE01\SG1
February 16th, 2010 3:36pm

I think I misunderstood. If you are wanting a script that will run from within the EMC, without using the EMS, I don't think you can do that. It was not designed for or intended to be used in that manner.If you want a GUI interface that you can use to selectively run a script against an object, or collection of objects selected from the GUI, I'd suggest you investigate Quest's PowerGUI.
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2010 4:16pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics