Chapter 3. WWPD: what would PowerShell do?

Before you dive into scripting and toolmaking, it’s worth having a conversation about “The Right Way to Do Things.” One of PowerShell’s advantages—and also one of its biggest disadvantages—is that it’s pretty happy to let you take a variety of approaches when you code. If you’re an old-school VBScript person, PowerShell will let you write scripts that look a lot like VBScript. If you’re a C# person, PowerShell will happily run scripts that bear a strong resemblance to C#. But PowerShell is neither VBScript nor C#; if you want to take the best advantage of it and let it do as much heavy lifting for you as possible, you need to understand The PowerShell Way of doing things. We’re going to harp on this ...

Get Learn PowerShell Scripting in a Month of Lunches now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.