Windows 11 24H2
PowerShell 5.1.26100.7019
Attempting to read from CSV file with PowerShell and count values contained within a specified cell. However, it appears if a cell contains parentheses, the script doesn’t register the cell as containing the value when counting.
(Import-CSV -Path "C:TempResults.csv" | Where-Object -Property "Reason" -Like "Failure (Unknown Reason)").Count
In this case, there are 11 entries in the “Reason” column within the CSV, but the results are always zero.
Is my syntax off or is there a different reason?
Thanks in advance.