PowerShell could be very forgiving of errors. For instance, if you happen to name one thing that doesn’t exist, then no error message is displayed. On this quick article I wish to present you easy methods to make PowerShell a bit extra strict with the strict mode.
Think about you’re calling a variable that doesn’t exist. PowerShell will show no errors.
One other instance. Why is it displaying true? $a doesn’t exist.
With strictmode mode, nonetheless, PowerShell will return an error. First we have to allow it.
Set-StrictMode -Model Newest
Now PowerShell will show an error: “The variable ‘$a’ can’t be retrieved as a result of it has not been set.“
That was what I wished to point out. Have enjoyable with PowerShell.
Revealed by