csv - Powershell using where-object -
i using powershell , having trouble where-object
cmdlet. select *
, want output when field equal alabama
. field under column, not one.
this have:
select * | {$_.state_name -eq 'alabama'} .
this works state_name, cant columns without doing them individually. i've tried where{$_ -eq....}
doesn't work.
kind of hack, but:
select * | {($_ | convertto-csv -notypeinformation)[1] -like '*"alabama"*'}
Comments
Post a Comment