|
Hi,
I am just getting my head around this so sorry if my code is a bit bloaty (I'm sure there is a more streemed line way of doing it). My Problem is I would like to retrieve the VALUE of $Variable2 (ie MyServer1 ) by using $MyVar
$PubApp = "TestApp" $ServerCount = "2" $Variable2 = "MyServer1" $Variable3 = "MyServer2"
$Count = "1" ? "Start Loop To Remove Servers" while $count <= $ServerCount ; I could have used UNTIL here instead
$MyVar = "$Variable2" + $Count ; This should pull back the VALUE of $Variable2( ie MyServer1 ) ? $MyVar ; This ACTUALLY Pulls back - $Variable2 shell "cmd /c Setprop $PubApp /ds $MyVar $Count = $Count +1 Loop
I have tried changing the String Expressions and even used CHR(34) but it always seem to pull back the String Name and NOT the String VALUE. The Shell cmd it is eventually going to be running removes Citrix servers from Published applications WITHOUT using the CMC, but for this example it doesn't matter what is happening in the loop, it isn't pulling in the value of another variable. The only other way I can think of is possibly an Array or a FUNCTION, but thought I would ask the experts if there is a way of getting the Value of my first Variable, as it would be useful to know in the future.
Thanx guys T
|