Search Documentation by Keyword

Search Documentation by Keyword


You are here:
← All Topics

This is a utility cmdlet that captures input from the user and validates it against a regex pattern. If a default value is provided, the user can accept it by pressing Enter.


Read-UserEntry `
    -Label <string> `
    [-Description <string>] `
    [-Default <string>] `
    [-Pattern <string>]


Label*Identifies the data being captured to the user.

Example: -Label "Height Above Sea Level"
DescriptionOptional description and/or instructions for user entry.

Example: -Description "The target SQL Server database server address."
DefaultDefault entry, which the user can accept by pressing the Enter key.

Example: -Default "0"
PatternRegex pattern against which user input will be validated.

Default: ".*"

Example: -Pattern "\d+"