Sep 05 2022 09:02 AM
Hi,
I'm working with PSWindowsUpdate module to automate some tasks related to Windows Servers Updates.
I've already created some scripting to go to each server, check which updates are available and write down the results to a centralized csv file.
As a next step I need to parse the csv to check some conditions and return the KB IDs I want to install to a variable, together with the server hostname in order to build the update command for the deployment of the updates.
So my csv has the following columns I need to parse, which are "ComputerName" and "KB". What I want to do is run through each row of the CSV, check the "KB" column and if "KB" is not empty than store the ComputerName and KB values to variables containing the KBs for each different ComputerName.
As I'm new to Powershell I can go up to parse the CSV and find the KB that is not empty, but now I'm not understanding how can I store this values to variables.
Can anyone give me some guidance?
Thanks
Sep 05 2022 09:03 AM
Sep 05 2022 04:03 PM
SolutionSep 06 2022 12:28 AM
Sep 05 2022 04:03 PM
Solution