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++?
Try:
$User = Read-Host -Prompt "Name"
echo "Hello $User"
Powershell support many languages.
Tourpage for this site? [grin] you are in violation of the rules by not posting code that "doesn't work as expected".outputmethod. however, there are severalWrite-*cmdlets. i recommend you read theGet-Helpinfo on them.inputalso lacks a dedicated method. there are, however, theRead-*cmdlets ... [grin]Read-*. i recommend you ReadTheFriendlyManual ...Get-Command *read*andGet-Help Read-Host. ///// [3] i also pointed out how to get the equivalent ofprintvia the variousWrite-*cmdlets. again, take a look at the help system for more info.