Script to create mailbox or mail user with variables RRS feed

  • Question

  • 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.


    Friday, May 4, 2012 7:03 PM


All replies