mjaromi / pwsh-mremoteng-confCons

Simple PowerShell cmdlet to call Consul API and generate confCons.xml file for mRemoteNG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pwsh-mremoteng-confCons

Simple PowerShell cmdlet to call Consul API and generate confCons.xml file for mRemoteNG

Params

  • consulUri - Consul address
  • connectionFile - path where confCons.xml should be saved
  • sshUsername - username for ssh connection

How to use it?

You can execute this cmdlet every time you start mRemoteNG. Just edit / create the shortcut and add this or run it in command line or powershell console:

powershell -NoProfile -Command "kill -Name mRemoteNG -Force -EA SilentlyContinue" ; New-mRemoteNGConnectionFile -consulUri {{ Consul Address }} -connectionFile {{ path for confCons.xml file }} -sshUsername {{ ssh username }} ; {{ path for mRemoteNG.exe file }} /c:"{{ path for confCons.xml file }}"

for example:

powershell -NoProfile -Command "kill -Name mRemoteNG -Force -EA SilentlyContinue" ; New-mRemoteNGConnectionFile -consulUri http://consul.mydomain:8500/v1/catalog/nodes -connectionFile C:\Program Files\mRemoteNG\confCons.xml -sshUsername my-ssh-user ; C:\Program Files\mRemoteNG\mRemoteNG.exe /c:"C:\Program Files\mRemoteNG\confCons.xml"

About

Simple PowerShell cmdlet to call Consul API and generate confCons.xml file for mRemoteNG

License:MIT License


Languages

Language:PowerShell 100.0%