Powershell.com’s Tip Of The Day–Avoid Use Of Set-StrictMode In Production? No Way!

I appreciate the Powershell tips from Powershell.com.

But the Monday, 3/21/11 tip recommends avoiding the use of Set-StrictMode “latest” in production, and I think that’s bad advice.  Here’s a quote from the tip:

However, Set-StrictMode should only be used on development machines. You should never use it on production machines or in production scripts as PowerShell will not complain about non-existing properties. Have a look:

Dir $env:windir | Where-Object { $_.Length -gt 1MB }

Read the rest of this entry »