user14273546
user14273546

Reputation:

Is there an input and output function in PowerShell?

I am new to PowerShell and I wanna try out a "Hello, (name)." program. Problem is I can't find an input function nor an output one.

Is there a PowerShell function I can use to get input like input in Python and output like cout in C++?

Upvotes: 0

Views: 144

Answers (2)

Brandon Venosa
Brandon Venosa

Reputation: 11

There is another way, Write-Host.

Upvotes: 1

MR Mark II
MR Mark II

Reputation: 453

Try:

$User = Read-Host -Prompt "Name"
echo "Hello $User"

Powershell support many languages.

Upvotes: 1

Related Questions