Previous Topic: push-winRemote Command--Copy and Execute on Multiple Remote Windows Systems (Funclet)Next Topic: pwd Command--Print Name of Working Directory (Cmdlet)


PW_GET Command--Input Hidden Data (Funclet)

This command (funclet) optionally prompts for input and reads characters until a enter is encountered. For each character typed, the command displays an asterisk (*) to hide the input.

The command has the following syntax:

PW_GET(prompt)

The command returns a string holding the characters entered in clear text.

prompt

String to be display as input prompt. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code into parenthesis.

Default: ""

Example

Use this command to hide passwords, if the password cannot be typed in clear text as part of a command:

run-remote Math.PI on "ascl1" -user alice -pass PW_GET(Enter password:)

See also:

accept Command--Read String From stdin and Assign it to a Variable (Cmdlet)