PoshCode Logo PowerShell Code Repository

Mirth Channel Creation by Ranadip Dutta 6 weeks ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/6681"></script>download | new post

Enabling and Deploying a Mirth Channel from Powershell

  1. Set-Location 'C:\Mirth Connect'
  2. $ChannelOutput=.\mccommand.exe -a https://localhost:38443 -u username -p password -s "C:\commands.txt"
  3.  
  4. If($ChannelOutput -like '*successfully*')
  5. {
  6. "Channel created successfully and deplyed"
  7. }
  8. else
  9. {
  10. $_.Exception.Message
  11. }
  12.  
  13.  
  14.  Commands.txt:
  15.  import "C:\TestServiceChannel1.xml" Force
  16. channel deploy "Channel_name"

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:


Remember me