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?

2
  • What does the values from the excel file have to do with Get-Date -Format? You can run the latter without any input Commented Aug 22, 2023 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)) Commented Aug 22, 2023 at 13:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.