Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: I don't understand this behavior

$
0
0

It looks like it has to do with your $Name parameter being a string array, while in the assignment of the $Operator variable it's being treated as a string. If I change the param block to [string]$Name I get the correct result.

I'm guessing when you tested it in the console, you tried $Name = 'name' and not [string[]]$Name = 'name'.


Viewing all articles
Browse latest Browse all 13067

Trending Articles