Forum Discussion
sivaponaka
Dec 30, 2019Copper Contributor
Unable to Pass variable value to For each loop
Hello Everyone, I'm new to Poweshell, Someone tell what's wrong in below code? i want to pass $server value to for each loop but below code is failing #getServerList $Servers = Invoke-Sql...
sivaponaka
Jan 07, 2020Copper Contributor
Thanks for your time oliwer_sundgren
My issue got resolved after adding parameterized property as below to code.
foreach($Server in $Servers.server_name)
oliwer_sundgren
Jan 07, 2020Iron Contributor
No problem! sivaponaka
Ah thats nice! Good job 🙂