I found the following code and I want to modify it slightly. unfortunately the output is not read into a real array. Excel Reading to Powershell Array
I then run through the array(s) with a for each loop and write a new Emailsent value (date + time) if necessary.
How can I adapt the code from the link so that it writes the values one after the other with a comma, so that I can format the array again with $Emailssent[$i] = get-date - format g ((get-Date).Addhours(1) ) can address?