I am trying to run below command on AWS SSM:
Parameters = @{
commands = @(
"Write-Host userid is $userID password $($password)"
'$userID2 = $userID'
'$password2 = $password'
"Write-Host userid is $userID2 password $($password2)"
)
}
First Write-Host statement prints the correct values of $userID and $password but after the assignment of the new variable, second Write-Host
variable prints empty for both variables. Am I doing something wrong? I tried fetching the values of $userID
and $password
with double quotes as well but no luck.