9 Replies Latest reply on Feb 29, 2016 11:14 AM by Bill Robinson

    What is quickest way to return name of appserver currently running a NSH Type 1 script execution thread

    Yanick Girouard

      I need a quick and simple way to get the name of the application server that is currently executing a type 1 NSH script job, during the script execution. Basically, I need to execute a command using nexec, against the app server that is handling the current execution thread. I don't want to hardcode a specific app server as I want this to be dynamic and safe.


      In short, we have shared a script directory that is synchronized using DFS on each app server, and we need to be able to call powershell (and other types) of scripts locally from that directory using nexec, while keeping the NSH Script connected to the target it was run against.


      We use this to launch powercli or perl scripts. We previously had a dedicated console server to run those scripts, but it became a dependency that we could no longer reboot from BSA, so I moved the scripts to each app server instead and need to setup something dynamic so I can call them locally and I need it to work even if we need to shutdown one app server for maintenance.


      The only way I found so far was to issue a "cd //@; disconnect" and then get the hostname, but that means I need to reconnect to the target afterwards...


      Any ideas ?