CHAPTER 24

Creating User Interfaces

IN THIS CHAPTER

Using text mode user interface

Creating a simple UI in Windows PowerShell using Windows Forms

Working with Windows Forms controls

Using Windows PowerShell and PrimalForms

Working with other UI mechanisms

This chapter shows you how you can create a user interface (UI) using Windows PowerShell. It looks first at what you can do, UI-wise, at the text mode console and then introduces Windows Forms and how to create a form using Windows PowerShell. You look at some of the key elements that you can add to a form, including button, textbox, and label controls, and how you can use these to create a simple share viewer application GUI. You then look at PrimalForms as a tool that can help you to lay out a form. The chapter finishes with a look at other ways to create UIs.

A user interface is a set of features that an end user accesses in order to use and operate an application. At the command line, UIs tend to be fairly basic. By comparison, a graphical user interface, or GUI, is a much richer Windows application, complete with buttons, boxes, and so on.

For Windows PowerShell, the most commonly used UIs are the Windows PowerShell console and the Windows PowerShell ISE. Although these are fine for users that fully understand Windows PowerShell, giving the command line to less experienced users may cause some degree of confusion and user resistance.

Working with Text Mode UI

A text mode UI for a Windows PowerShell script is usually pretty ...

Get Windows PowerShell® 2.0 Bible 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.