Add ternary operator in object

Himanshuk 161 Reputation points
2021-11-29T16:51:41.82+00:00

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.
36,264 questions
{count} votes