I am writing a simple script to get more familiar with powershell.
This script reads input parameters into a hash
$states = @($args) $states write-host Color is $states.color
On the command-line, I set the following values
$shape = 'circle'; $color = 'pink'; $size = 'large'
I then invoke the program with the following command
.\shapes_n_colors.ps1 $shape $size $color
And, I get the following output:
circle large pink Color is
I am unable to figure out why $states.color is blank. I was expecting the output "Color is pink"
Where am I going wrong???