How do you write a batch/cmd file that calls Exchange 2007 cmdlets?
Posted on 2007-10-03
I've written a small batch file that accepts a parameter which is then used to create directories, setup an Exchange storage group, create an Exchange mailbox then mount that new mailbox. The directory stuff works ok but the Exchange cmdlet bits fail with the following error:
'new-StorageGroup' is not recognized as an internal or external command, operable program or batch file.
Is there a special way I need to call these cmdlets from batch/command scripts? Do I need to write my own Powershell cmdlet to get these working? I know the cmdlets work individually because I use them all the time - they just don't work from this batch file.
Any hints? I'm sure I'm missing something key here. :)