Press "Enter" to skip to content

Enabling Powershell’s Strict Mode

Patrick Gruenauer grabs the ruler:

PowerShell is very forgiving of errors. For example, if you call something that does not exist, then no error message is displayed. In this short article I want to show you how to make PowerShell a bit more strict with the strict mode.

Consider you are calling a variable that doesn’t exist. PowerShell will display no errors.

Granted, that laxity isn’t On Error Resume Next level bad, but Patrick shows us a way to toughen up the interpreter’s responses.