PowerTip: Ensure Compliance with PowerShell Best Practices

Doctor Scripto

Dr Scripto

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

Doctor Scripto
Dr Scripto

Scripter, PowerShell, vbScript, BAT, CMD

Follow Dr Scripto   

0 comments

    Leave a comment