$foo = "this is the original text" function f1($str) { "Calling f1..." $str.toUpper() } function f2($value) { . "Calling f2... what is value?" . $value | get-member . "" "Before f1 value is: " + $value "Before f1 foo is: " + $script:foo $script:foo = f1 $value "after f1 value is: " + $value "after f1 foo is: " + $script:foo } "" "BEFORE PASS 1, WHAT IS FOO?" $foo | get-member "" "PASS 1" f2 $foo "" "AFTER PASS 1, WHAT IS FOO?" $foo | get-member "" "" "PASS 2" f2 $foo "" "global value" $foo