PowerShell Best Practice #1 – Use Single Quotes

I’m going to kick off this series with a no-brainer. In PowerShell, there are 2 ways to quote strings, using single-quotes (‘) or double-quotes (“). This is probably not a surprise to you if you’ve seen PowerShell scripts before. A “best practice” in PowerShell is that you should always default to using single-quotes unless you …

Continue reading ‘PowerShell Best Practice #1 – Use Single Quotes’ »

PowerShell Best Practices

I’ve seen several posts on PowerShell best practices, and even read Ed Wilson’s book on the subject. There is some commonality in the lists in the obvious places (verb-noun, output objects, format your code nicely), and some disagreement in other areas (code signing, for example). I also see a great amount of variation in use …

Continue reading ‘PowerShell Best Practices’ »