how to have this content become body of HTML email??

Yea just looked at this again. Ignore my last two posts. Keep everything inside the foreach loop. Don’t change $Events, you want that to be overwritten each iteration. It’s the $Body = “Reported on $Date - $DC” line that needs to be changed to $Body +=. This way $Body isn’t getting wiped out each time the loop iterates. You will have to define $Body as an array above the foreach loop though. And yea figure out some way to generate some sort of separator in between the dc reports since they’ll all be mashed into the same email.

Sorry for the confusion! Carry on.

With Jack’s most recent suggestions I got it all working.
I have one foreach to create and store the daily html report file, which looks nicer than the email.
I have one foreach to put all the stuff into an email and send it to me nightly.
Thank you, Tom