I need to write a DOS batch file that can 'invoke' Powershell and then pass a cmd to the Powershell command line...
I can write the batch file that calls 'Powershell' and opens the cmd line in PS. But then how can I pass in - into the PS command window , the commands I need to excute a PS command?
TEST.BAT - looks like this.. but then I need to invoke the new-mailbox command.. how do I pass that in too?
powershell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1" -noexit -command "