Quantcast
Channel: VMware Communities : Discussion List - Site Recovery Manager
Viewing all articles
Browse latest Browse all 3691

Storing PowerShell Scripts With Input Parameters as Resource Element

$
0
0

I'm trying to find the best way to store my various PowerShell scripts in a single location rather than on each of the PowerShell Hosts' local filesystem. I've been able to create a ResourceElement with the script but if the script has input parameters, how do you pass those in? 

 

For example, resource element has this script contents:

param (    [string] $server
)

return $server

 

And a workflow retrieves the contents of the resource element into say variable named script and then used with invokeScript:

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

 

How do you input the $server parameter?


Viewing all articles
Browse latest Browse all 3691

Trending Articles



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