PowerShell 5.1
I'm not sure I understand what just happened in the script below:
function Main {
$testParm = 'hello world'
function1
}
function function1 {
$testParm | Out-Host
}
Main
Output
hello world
I'm evaluating $testParm
within Function1
which should be blank. But it's outputting 'hello world'
which was assigned only in Main
function.