Unofficial Powershell Strict Mode

Use Powershell Strict Mode (Unless You Love Debugging)

Set-StrictMode -Version 2 $ErrorActionPreference = "Stop" # ^^^

Inspired by http://redsymbol.net/articles/unofficial-bash-strict-mode/

Comments

  1. Always use the unofficial powershell unofficial strict mode to preserve your sanity when working with powershell.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to monitor a directory for changes with ReadDirectoryChangesW

Fastest way to zero out memory - stream past cache with movntdq/_mm_stream_si128

Extended Terrain XYZ now free and open source