共用方式為


PSHostUserInterface.ReadLineAsSecureString Method

Definition

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).

public:
 abstract System::Security::SecureString ^ ReadLineAsSecureString();
public abstract System.Security.SecureString ReadLineAsSecureString ();
abstract member ReadLineAsSecureString : unit -> System.Security.SecureString
Public MustOverride Function ReadLineAsSecureString () As SecureString

Returns

The characters typed by the user in an encrypted form.

Remarks

Note that credentials (a user name and password) should be gathered with PromptForCredential(String, String, String, String)PromptForCredential(String, String, String, String, PSCredentialTypes, PSCredentialUIOptions)

Applies to

See also