Reputation: 11
This is my code with PHP that passes a variable to a PowerShell script.
Param([string]$username,[string]$pass)
write-output ("username $username password $pass")
The output if I insert username:sam and pass:123 is:
username sam123 password
I want it to be like this:
username sam password 123
How can you do this?
Upvotes: 0
Views: 47
Reputation: 73
You can try like this
"Username:{0} Password:{1}" -f $username , $pass
Upvotes: 1