I have an variable: $a = sfd
. If I use New-Item '1'$a
, then it will yield this error:
New-Item: A positional parameter cannot be found that accepts argument 'sdf'.
But if I use New-Item "1$a"
then it works. According to How do I concatenate strings and variables in PowerShell? both two methods should work. Do you know why is that?