Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Running Script on PowerShell Host - spaces in parameters

$
0
0

Hi Guys,

 

How do i pass a parameter from vRO to a remote PowerShell host that has a space in it (e.g. the subject and body in the script below)?  If I quote the parameter in the vRO form it works fine, but i'd like to do it programmatically to ensure my users don;t need to use quotation marks via vRA.

Script is similar to:

 

var output;

var session;

var arguments = sender + " " + recipient + " " + subject + " " + body + " " + smtpServer ;

 

try {

  session = host.openSession();

  var script =  '& "' + externalScript + '" ' + arguments;

  output = System.getModule("com.vmware.library.powershell").invokeScript(host,script,session.getSessionId()) ;

  }

 

finally {

  if (session){

  host.closeSession(session.getSessionId());

  }

}

 

 

Thanks,

Dan


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>