PowerShell

Read-Host

SafeInteractive input

$v = Read-Host '入力してください'

Reads user input; -AsSecureString masks passwords — the safe front door for interactive scripts.

Examples

  • $pw = Read-Host 'Password' -AsSecureStringMasked password entry

Syntax

Read-Host 'prompt' [-AsSecureString]

Before you run it

Input only.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store