System.Management.Automation.Host Namespace

 

Updated: April 27, 2016

Applies To: Windows PowerShell

The System.Management.Automation.Host namespace contains the classes, enumerations, and interfaces that are used to define a custom host that provides communications between the user and the Windows PowerShell engine. This communications includes dialog-oriented functionality, such as what types of prompts are used, and low-level functionality, such as the foreground and background colors of displayed text.

ClassDescription
System_CAPS_pubclassChoiceDescription

Defines a choice that can be presented to the user by the host interface, such as Yes to &All.

System_CAPS_pubclassFieldDescription

Represents an option that is used in a Windows PowerShell prompt call.

System_CAPS_pubclassHostException

The exception thrown when the host cannot complete an operation, such as when the host is checking whether there is any input available.

System_CAPS_pubclassPromptingException

The exception that is thrown when an error occurs while the host displays a prompt for a command parameter.

System_CAPS_pubclassPSHost

Contains the base functionality for creating a custom host. A host provides communications between the Windows PowerShell engine and the user.

System_CAPS_pubclassPSHostRawUserInterface

Defines the low-level host functionality, such as read and write actions, that a host application can implement to support cmdlets that perform character-mode interaction with the user.

System_CAPS_pubclassPSHostUserInterface

Defines the custom host functionality that is used to perform dialog-oriented and line-oriented interaction, such as writing to, prompting for, and reading from user input.

StructureDescription
System_CAPS_pubstructureBufferCell

Represents a buffer cell that has a specific character, foreground color, background color, and cell type.

System_CAPS_pubstructureCoordinates

Defines the X (column) and Y (row) coordinates that are used to describe the corners of a Rectangle object.

System_CAPS_pubstructureKeyInfo

Represents key information such as the character, virtual key code, the state of any associated control keys, and the state of the key (down).

System_CAPS_pubstructureRectangle

Represents a rectangular region of the screen.

System_CAPS_pubstructureSize

Represents a width and height pair.

InterfaceDescription
System_CAPS_pubinterfaceIHostSupportsInteractiveSession

Use this interface to enable cmdlets such as Enter-PsSession and Exit-PsSession. This class is introduced in Windows PowerShell 2.0.

System_CAPS_pubinterfaceIHostUISupportsMultipleChoiceSelection

Provides a set of choices that enable the user to choose one or more options. This interface is introduced in Windows PowerShell 2.0.

EnumerationDescription
System_CAPS_pubenumBufferCellType

Defines the type of buffer cells that can be used to display single-cell or double-cell characters. For example, is the cell complete or is a leading or trailing cell for double-cell characters.

System_CAPS_pubenumControlKeyStates

Defines the states of specific control keys, such as the ALT key, CTRL key, SCROLL key, and CAPSLOCK key.

System_CAPS_pubenumReadKeyOptions

Defines the options used to control the behavior of the ReadKey method.

Return to top
Show: