Skip to Main Content
Learn PowerShell Scripting in a Month of Lunches
book

Learn PowerShell Scripting in a Month of Lunches

by Jeffery Hicks, Don Jones
December 2017
Beginner content levelBeginner
352 pages
10h 31m
English
Manning Publications
Content preview from Learn PowerShell Scripting in a Month of Lunches

Chapter 9. Avoiding bugs: start with a command

Before we ever fire up a script editor, we start in the basic PowerShell command-line window. This is your lowest common denominator for testing, and it’s a perfect way to make sure the commands your tool will run are correct. It’s way easier to debug or troubleshoot a single command from an interactive console than it is to debug an entire script. And by “a single command,” we mean a PowerShell expression—a single thing that we can manually type into the console to see if we’ve got the right syntax.

This is by design

One of the cool parts about PowerShell is that you can open a console, run commands, and get immediate results (or errors). Traditionally, programmers have had to write ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Windows PowerShell in a Month of Lunches, Third Edition

Learn Windows PowerShell in a Month of Lunches, Third Edition

Don Jones

Publisher Resources

ISBN: 9781617295096Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link