Hi,
You could try something like below
$file = "C:\temp\file.csv"
$os = "Windows 10"
$content= Import-Csv -Path $file
$headers = ($content | Get-Member -MemberType NoteProperty).Name
if($os -in $headers){
$kb = $content.$os
}
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.