Read-SpectrePause
Description
The Read-SpectrePause function pauses the script execution and waits for user input to continue. It displays a message prompting the user to press the enter key to continue. If the end of the console window is reached, the function clears the message and moves the cursor up to the previous line.
Examples
Example 1
This example demonstrates how to use the Read-SpectrePause function.
Example 2
This example demonstrates how to use the Read-SpectrePause function with the AnyKey parameter.
Parameters
Message
The message to display to the user. The default message is “[default value color]Press [accent color]enter[/] to continue[/]”.
Type | Required | Position | PipelineInput | Aliases |
---|---|---|---|---|
[String] | false | 1 | false | Title Question Prompt |
AnyKey
Type | Required | Position | PipelineInput |
---|---|---|---|
[Switch] | false | named | false |
NoNewline
Indicates whether to write a newline character before displaying the message. By default, a newline character is written.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Switch] | false | named | false |