I'm trying to learn basic powershell loops on CSV files. Tried many tutorials or guides online but no avail. Hope you guys can help. Thanks
Here's my CSV file
Tried to loop through it to look for vpn_name and display the key but seems it won't find what I'm looking for. The path is correct since I tried to display what's inside $c.'vpn_name' displays list from test to test3.
$csv = import-csv -Path "path.csv"
foreach ($c in $csv) {
$c.'vpn_name' -contains 'test'
}
Hope you guys can help. Really appreciate it. Thanks

-containsoperator is for collection objects and requires an exact match. to matchtest1withtestyou must either use the-matchregex operator OR the-likewildcard string operator ... with wildcard chars.