Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Read-Host

Read-Host - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Read-Host

Description
Read a line of input from the host console

Usage


Options


Example(s)
Present the string "Please enter your name:" as a prompt. When a value is entered and the Enter key is pressed, that value is stored in the $myname variable:

PS C:\>$myname = read-host "Please enter your name:"

Presents the string "Enter a Password:" as a prompt. When a password is entered and the Enter key is pressed, the value is stored as a SecureString:

PS C:\>$my_password = read-host "Enter a Password:" -assecurestring