Chapter 25. Creating a GUI tool, part 3: the output
In the previous two chapters, we showed you how to create a GUI and add functionality to it. In this chapter, we’ll take that functionality and use it to create some output for the application’s user. We’ll focus on two techniques: the easy, built-in way of generically displaying output and the harder, more customized way of building your own output form.
25.1. Using Out-GridView
We’ll start by using the Out-GridView cmdlet, which will be available on any computer that has the PowerShell ISE installed. We’ll make one minor change to our application’s OK button handler; the complete handler is listed here:
$OKButton_Click={ if ($EventLogName.Visible) { # retrieve event log if ($EventLogName.SelectedIndex ...
Get Learn PowerShell Toolmaking in a Month of Lunches 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.