In a Linux shell script called hello.sh for example, you can take input in the following manner:
$name = $1
$Age = $2
echo "Hi $name!"
echo "You are $age years old!"
And one would execute this script on the Linux command line as the following:
./hello.sh Bob 99
Is there an equivalent way to take input in the script in PowerShell in this manner?
I have only seen Read-Host, but this prompts the user for input after the Powershell script has executed. I would like to call the script with the required input parameters on the command line.