I am trying to output computer manufacture dates by way of looking up a csv file with a list of processor dates and returning the Dates if processor date of computer matches what is populated in the csv list. I am trying to achieve this by using the import-csv cmdlet which will import a csv file from an excel sheet with prepopulated processor models and their Date objects. A sample of this CSV File is posted below. A powershell script which contains this command will then look up and compare based on header rows and then will provide the right date based on match or if condition met true.
My code so far returns all release Dates instead of matched Date. Which isnt the expected result.
Here is a sample of my script
$OutModel = Get-WmiObject Win32_Processor | Select name
Import-Csv C:\date_source\manufacture_date.CSV -Delimiter ";" | where {$_.Name -ne ""} | %{write-host The Manufacture Date is: $_.Release}
Here is a sample of my import-Csv File
Model;Release;;;;;;;;
;;;;;;;;;
i7-8086K ;Q2 2018;;;;;;;;
i7-8700K;Q4 2017;;;;;;;;
i7-8700;Q4 2017;;;;;;;;
i5-8600K;Q4 2017;;;;;;;;
i5-8500;Q2 2018;;;;;;;;
i5-8400;Q4 2017;;;;;;;;
i3-8350K;Q4 2017;;;;;;;;
i3-8100;Q4 2017;;;;;;;;
Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz;Q3 2017;;;;;;;;
i7-8550U;Q3 2017;;;;;;;;
i7-8750H;Q2 2018;;;;;;;;
i5-8350U;Q3 2017;;;;;;;;
i5-8300H;Q2 2018;;;;;;;;
i5-8250U;Q3 2017;;;;;;;;
i7-8665U;Q2 2019;;;;;;;;
i7-8565U;Q3 2018;;;;;;;;
i5-8365U;Q2 2019;;;;;;;;
i5-8265U;Q3 2018;;;;;;;;
i3-8145U;Q3 2018;;;;;;;;
I am expecting something like "The Manufacture Date is : Q2 2018" ..one line . Some code snippets or code ideas to get the exact to get expected output will be appreciated.