I have a script A which calls a script B. Script A has a variable $var. Script B assigns a value to variable $var.
When script B finishes, and I get the value of $var in script A, the value remains unchanged (original value, not what B set it as.)
It's as if B changes a copy of $var, not the original $var that was in A. I need changes that script B makes to $var to stay.
I tried defining $var as global in A, Set-Variable var -scope global.
But the same thing happens.
Thanks for your help!
|