Subscribe to Windows IT Pro

My 12 PowerShell Best Practices

Here are the collected links to my top 12 recommendations.
Posted @ 8/3/2011 10:03 AM By Don Jones

 
Over the past few months, I've published a 12-part series of posts entitled "What To Do / Not To Do in PowerShell." These summarize my 12 major best practices for the shell, many of which are also enthusiastically endorsed by the broader PowerShell community. For your convenience, here they all are:
  1. Never use Write-Host
  2. Avoid $ErrorActionPreference
  3. Indent your code
  4. Spell out cmdlet and parameter names
  5. Don't use Hungarian notation
  6. Use multi-purpose "comments"
  7. Use mostly single quotes
  8. Use source control
  9. Use code signing
  10. Use cmdlet style naming
  11. Avoid the global scope
  12. Output objects
Enjoy!

Related Content:

Comments

Add A Comment
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.