Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


elg0ch0
2019-05-29T19:20:47Z
Hi,

Should I do something different when accessing the value of a User Variable from a powershell script located in a file?
The situation is this:
If I do
$vmname = "{USERVAR(vmname)}"

in powershell task coping the code in the powershell textbox it works but if I do it from a powershell file $vmname vale is the string: "{USERVAR(vmname)}" instead of its value.

Am I missing something here?

Thanks!
Sponsor
Forum information
elg0ch0
2019-05-29T20:23:11Z
I solved it by sending the values as parameters to the powershell script, is there a better way?
Support
2019-06-04T09:04:49Z
Originally Posted by: elg0ch0 

I solved it by sending the values as parameters to the powershell script, is there a better way?



I think this is the best way.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top