PSHostUserInterface PSHostUserInterface PSHostUserInterface Class

Definition

Defines the properties and facilities providing by an hosting application deriving from PSHost that offers dialog-oriented and line-oriented interactive features.

public abstract class PSHostUserInterface
type PSHostUserInterface = class
Public MustInherit Class PSHostUserInterface
Inheritance
PSHostUserInterfacePSHostUserInterfacePSHostUserInterface

Constructors

PSHostUserInterface() PSHostUserInterface() PSHostUserInterface()

Creates a new instance of the PSHostUserInterface class

Properties

RawUI RawUI RawUI

Gets hosting application's implementation of the PSHostRawUserInterface abstract base class that implements that class.

SupportsVirtualTerminal SupportsVirtualTerminal SupportsVirtualTerminal

Returns true for hosts that support VT100 like virtual terminals.

Methods

Prompt(String, String, Collection<FieldDescription>) Prompt(String, String, Collection<FieldDescription>) Prompt(String, String, Collection<FieldDescription>)

Constructs a 'dialog' where the user is presented with a number of fields for which to supply values.

PromptForChoice(String, String, Collection<ChoiceDescription>, Int32) PromptForChoice(String, String, Collection<ChoiceDescription>, Int32) PromptForChoice(String, String, Collection<ChoiceDescription>, Int32)

Presents a dialog allowing the user to choose an option from a set of options.

PromptForCredential(String, String, String, String) PromptForCredential(String, String, String, String) PromptForCredential(String, String, String, String)

Prompt for credential.

PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions) PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions) PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions)

Prompt for credential.

ReadLine() ReadLine() ReadLine()

Reads characters from the console until a newline (a carriage return) is encountered.

ReadLineAsSecureString() ReadLineAsSecureString() ReadLineAsSecureString()

Same as ReadLine, except that the result is a SecureString, and that the input is not echoed to the user while it is collected (or is echoed in some obfuscated way, such as showing a dot for each character).

Write(ConsoleColor, ConsoleColor, String) Write(ConsoleColor, ConsoleColor, String) Write(ConsoleColor, ConsoleColor, String)

Same as Write(String), except that colors can be specified.

Write(String) Write(String) Write(String)

Writes characters to the screen buffer. Does not append a carriage return.

WriteDebugLine(String) WriteDebugLine(String) WriteDebugLine(String)

Invoked by WriteDebug(String) to display a debugging message to the user.

WriteErrorLine(String) WriteErrorLine(String) WriteErrorLine(String)

Writes a line to the "error display" of the host, as opposed to the "output display," which is written to by the variants of and

WriteInformation(InformationRecord) WriteInformation(InformationRecord) WriteInformation(InformationRecord)

Invoked by WriteInformation(InformationRecord) to give the host a chance to intercept informational messages. These should not be displayed to the user by default, but may be useful to display in a separate area of the user interface.

WriteLine() WriteLine() WriteLine()

The default implementation writes a carriage return to the screen buffer.

WriteLine(String) WriteLine(String) WriteLine(String)

Writes characters to the screen buffer, and appends a carriage return.

WriteLine(ConsoleColor, ConsoleColor, String) WriteLine(ConsoleColor, ConsoleColor, String) WriteLine(ConsoleColor, ConsoleColor, String)

Same as WriteLine(String), except that colors can be specified.

WriteProgress(Int64, ProgressRecord) WriteProgress(Int64, ProgressRecord) WriteProgress(Int64, ProgressRecord)

Invoked by System.Management.Automation.Cmdlet.WriteProgress(System.Int64,System.Management.Automation.ProgressRecord) to display a progress record.

WriteVerboseLine(String) WriteVerboseLine(String) WriteVerboseLine(String)

Invoked by WriteVerbose(String) to display a verbose processing message to the user.

WriteWarningLine(String) WriteWarningLine(String) WriteWarningLine(String)

Invoked by WriteWarning(String) to display a warning processing message to the user.

Applies to

See Also