the interpreter will throw an exception if the referenced variable hasn’t been set yet.Let's see when that feature might come in handy.
PS> Set-PSDebug -OffAs you can see, with "Strict" mode off(well "Strict" flag is of type Switch, and all the Boolean flags were replaced with Switches), the PowerShell interpreter simple accepts the fact that function "add" just adds value of $x and $z without caring about what the value of $z is.
PS> function add($x, $y) { $x + $z }
PS> add 1 10
1
PS> $z = 100
PS> add 1 10
101
PS> Set-PSDebug -StrictAlthough the demo is really too simple of a case, in your scripts, you might have variables that you are not keeping track of but being still used somewhere in your scripts.
PS> ri function:add; rv z # remove "add" function and the variable $z
PS> function add($x, $y) { $x + $z }
PS> add 1 10
The variable $z cannot be retrieved because it has not been set yet.
At line:1 char:31
+ function add($x, $y) { $x + $z <<<< }
Experimenting with a different format of blogs...