User Interface Class
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the properties and facilities providing by an hosting application deriving from PSHost that offers dialog-oriented and line-oriented interactive features.
public ref class PSHostUserInterface abstract
public abstract class PSHostUserInterface
type PSHostUserInterface = class
Public MustInherit Class PSHostUserInterface
Creates a new instance of the PSHostUserInterface class.
Gets hosting application's implementation of the PSHostRawUserInterface abstract base class that implements that class.
Returns true for hosts that support VT100 like virtual terminals.
Get the ANSI escape sequence for the given format style.
Get the appropriate output string based on different criteria.
|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)||
Presents a dialog allowing the user to choose an option from a set of options.
|PromptForCredential(String, String, String, String)||
Prompt for credentials.
|PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions)||
Prompt for credential.
Reads characters from the console until a newline (a carriage return) is encountered.
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)||
Same as Write(String), except that colors can be specified.
Writes characters to the screen buffer. Does not append a carriage return.
Invoked by WriteDebug(String) to display a debugging message to the user.
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
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.
The default implementation writes a carriage return to the screen buffer.
|WriteLine(ConsoleColor, ConsoleColor, String)||
Same as WriteLine(String), except that colors can be specified.
Writes characters to the screen buffer, and appends a carriage return.
Invoked by System.Management.Automation.Cmdlet.WriteProgress(System.Int64,System.Management.Automation.ProgressRecord) to display a progress record.
Invoked by WriteVerbose(String) to display a verbose processing message to the user.
Invoked by WriteWarning(String) to display a warning processing message to the user.