I need to set a global variable from a function and am not quite sure how to do it.
# Set variables $global:var1 $global:var2 $global:var3 function foo ($a,
As simple as:
$A="1" function changeA2 () { $global:A="0"} changeA2 $A