[Tip] Option Explicit in PowerShell

Someone asked me how we can set Windows PowerShell to work like in VB when you specify Option Explicit.
How to disable using of variables that didn't defined in the code. In this way, you know for sure that you aren't use undefined variable and get unexpected results.

to do "Option Explicit" in PowerShell, simply run this command:

set-psdebug -strict

and to disable the Option Explicit:

set-psdebug -off

Shahar.

7 Comments

Comments have been disabled for this content.