Chapter 19. Input and output

To this point in the book, we’ve primarily been relying on PowerShell’s native ability to output tables and lists. As you start to combine commands into more-complex scripts, you’ll probably want to gain more precise control over what’s displayed. You may also need to prompt a user for input. In this chapter, you’ll learn how to collect that input, and how to display whatever output you might desire.

We want to point out, however, that the contents of this chapter are useful only for scripts that interact with human eyeballs and fingertips. For scripts that run unattended, these aren’t appropriate techniques, because there won’t be a human being around to interact with.

19.1. Prompting for, and displaying, information ...

Get Learn Windows PowerShell in a Month of Lunches, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.