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