(I'm a PowerShell newbie, and finding it a very frustrating language)
I want to create a function - with arguments and a return value. Not rocket science? That's what I thought anyway. But PowerShell keeps concatenating my arguments - here's the MCVE version:
function hello($a, $b) {
Write-host "a is $a and b is $b"
}
hello("first", "second")
I was expecting this to produce the output:
a is first and b is second
I wasn't expecting....
a is first second and b is
along with the fact it is concatenating values in a way I don't expect, its also failing to flag up the argument which is consequently missing.
How can I pass arguments to a function? (!!!!OMG WTF????!!!)