I have a csv file that looks like this:
NO ID TOTAL
1 123 1000
2 456 1500
3 123 2500
4 112 4000
I want to exclude the rows where ID=123 and the TOTAL>3000.
$File = Import-Csv 'SELL.csv'
$File | Where-Object { $_.ID -eq "123", $_.TOTAL -lt "3000" } -Exclude |
Export-Csv 'SELLREPORT.csv' -NoType
What am I doing wrong?