Add ternary operator in object

Himanshuk 161 Reputation points

I have to populate csv like, if val is there the in csv col colA it will add Val else add N
A+=[psobject]@(colA=Val: Val:N)
Can it be possible using powershell object A, it will reduce my effort to add else loop for value N as there are 128 colums also instead ternary operator is there any other way to print using hashtable or pscustomobject or any other way

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
34,897 questions
{count} votes