$s = "report-2024.csv" # .Contains tests for a literal substring Write-Output $s.Contains("2024") # -like matches shell wildcards Write-Output ($s -like "*.csv")
substring test vs wildcard match