0

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

enter image description here

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?

Michael
  • 43
  • 1
  • 1
  • 6
  • What does the values from the excel file have to do with `Get-Date -Format`? You can run the latter without any input – Mathias R. Jessen Aug 22 '23 at 13:20
  • In my script I want to insert a new value (getdate + 1 hour) into the array imported from Excel. But I only know how to address the consecutively listed arrays separated by commas (see picture) with $Emailssent[$i] = Get-date -format g ((Get-Date).AddHours(1)) – Michael Aug 22 '23 at 13:25

0 Answers0