I'm using powershell 4 to invoke the Mirth Connect command line interface (mccommand.exe). I am explicitly avoiding use of the "-s" parameter of the Mirth CLI to pass a Mirth script file because I want to pass dynamic commands instead to the Mirth Shell.
When I invoke mccommand.exe from an interactive powershell console, I am able to connect to the Mirth Connect server and the Mirth Shell is opened where I can run one or more Mirth Shell commands to manage Mirth Channels.
Example:
. "C:\Program Files (x86)\Mirth Connect\mccommand.exe" -a "https://localhost:8443" -u admin_user -p admin_password
Connected to Mirth Connect server @ https://localhost:8443 (3.4.1.8057)
$
When I run the same command from within a powershell script via the Windows Powershell ISE, I get the same "Connected to Mirth Connect server @ https://localhost:8443 (3.4.1.8057)" message but the script waits and I never get the "$" command prompt that allows me to pass Mirth Shell commands to Mirth.
Any thoughts on how I can route commands to the Mirth Shell via a Powershell script?