your $list contains strings, not commands. What you want to get?
"steph" <steph[ at ]discussions.microsoft.com> rakstÄ«ja ziņojumÄ "news:1C916815-6FC5-4B0F-A39C-24CA307A0BE8[ at ]microsoft.com"...
[Quoted Text] > Hi > > I would like to do this : > > $list="get-command","get-service" > foreach ($l in $list) > { > echo $l > foreach($i in $l) > { > $a=$i.name > echo $a > } > } > The probleme is : > The variable in the second foreach ($ l) appears to be seen as a string > and > not a command.do anyone have an idea ? > Thanks
|