Script to create mailbox or mail user with variables
I am working on creating two scripts. I want these scripts to be ran using variables passed to them from another process if possible. We have a custom built utility that creates Active Directory users and sets some other things up. What
I want to be able to do is something like this...
In the processing of our current process I want to call a script similiar to this: c:\powershell.exe c:\scripts\mailbox.ps1
user@domain.com "server\storage group\database"
What I am thinking of is it passing the user and mailbox database necessary to create a new mailbox. The second script would funtion the same way only needing
user@domain.com and the externalemailaddress for a mail user. In both cases the AD account would have already been created earlier in the process. I just cannot find anything that discusses if it is possible
to build a powershell script that is expecting input and then pass that necessary input through the command line call to that script.Zach
May 4th, 2012 3:03pm
Hello Zachs,
When you go to create new mailbox or mail user, you can use txt file or csv file to input the needed parameters.
Here are some related threads for you:
Exchange 2010 - Powershell to create mailbox for all AD users
http://social.technet.microsoft.com/Forums/en-GB/exchangesvradmin/thread/7b733f5c-7040-4514-b40a-2ae90d255345
Powershell Script Help to create Mailboxes in Exchange 2010
http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/883046e4-21a1-4b11-b7c0-2fb76a41fb87
Thanks,
Evan Liu
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact
tngfb@microsoft.com Evan Liu
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 1:46am
Hi Zachs,
Any updates on this issue?
Thanks,
Evan Liu
TechNet Subscriber Support in forum
If you have any feedback on our support, please contacttngfb@microsoft.com
Evan Liu
TechNet Community Support
May 8th, 2012 2:08am
Thanks for the suggestions and links. They provided the information necessary to build the power shell script as well as a vb script to get the required information .Zach
Free Windows Admin Tool Kit Click here and download it now
May 11th, 2012 9:57am