The -match operator is frequently used in scripts however not everyone seems to understand how it really works. It can be a really dangerous filter operator.
Let’s first create some sample data:
$list = 'ServerName, Location, Status
Test1, Hannover, Up
Test2, New York, Up
Test11, Sydney, Up' | ConvertFrom-Csv
The result is a list of hypothetical servers:
ServerName Location Status