PS E:\> Get-EC2Image ami-123456 | ?{$_ | where-object {$($_.Tag.Value) -match "val1"}} | select-object @{Name='TagValue
s'; Expression={$_.Tag.Value} }
TagValues
---------
{436, Val1, TTT}
The output suppose to return 'Val1' only. Why it returns all the values?