sarya
15 years agoFrequent Contributor
How to add a variables in network suite
Hi,
I have 7 script units in the project that I am currently running as a network suite .Currently ,I create a variable manually in my scripts ,for example var servername = 'vm2k3' . Everytime I run these scripts on different VMs,I need to change the servername manually in all the scripts to change servername from 'vm2k3' to 'vm2k8' .How can I do this using varaibles .I read the help article on creating variables but was not able to really get the process.Has someone been into same situation where they need to run the same project on different VMs and need to change vmname in the script .I need to know the process and also how to create variables. Also what is the local value and defualt value in variables column.Also I created a variable as 'Var1' with default value as "vm2k3".Then I substituted "servername" with value as "Var1" but run fails saying Var1 is undefined.
Thanks.
I have 7 script units in the project that I am currently running as a network suite .Currently ,I create a variable manually in my scripts ,for example var servername = 'vm2k3' . Everytime I run these scripts on different VMs,I need to change the servername manually in all the scripts to change servername from 'vm2k3' to 'vm2k8' .How can I do this using varaibles .I read the help article on creating variables but was not able to really get the process.Has someone been into same situation where they need to run the same project on different VMs and need to change vmname in the script .I need to know the process and also how to create variables. Also what is the local value and defualt value in variables column.Also I created a variable as 'Var1' with default value as "vm2k3".Then I substituted "servername" with value as "Var1" but run fails saying Var1 is undefined.
Thanks.