May 27th, 2014

PowerTip: Ensure Compliance with PowerShell Best Practices

Doctor Scripto
Scripter

Summary: Learn how to force Windows PowerShell to comply with basic best practices.

Hey, Scripting Guy! Question Is there an easy way for me to help Windows PowerShell comply with basic best practices?

Hey, Scripting Guy! Answer Use the Set-StrictMode –Version Latest command to ensure that you cannot reference things such as
          uninitialized variables and non-existent properties of an object:

 Set-StrictMode -Version latest

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback