I have to create a bunch of new users. To make things easier (and a lot faster) I am using a simple batch script. I am using set to set some enviroment values.(ex. set account=johndoe)
I know how to create a new mailbox using the Exchange Management Shell but is it possible to use/push the enviroment settings (used in the batch script) to the Exchange Management Shell?
The batch file contains the following enviroment settings:
These enviroment settings should be used to create the new mailbox in the Exchange Management Shell:
Enable-Mailbox -Identity 'domain.local/Administration/%firstname% %surname%' -Alias '%account%' -Database 'SERVER\First Storage Group\Mailbox Database'
I'm a noob when it comes to powershell/management shell so I would greatly appreciate it if someone could tell me how to achieve this.
Thanks in advance!