Hi @NGaur-3476 ,
you can just add this line to create the column heading to the file:
# To add the column heading to an existing file
Out-File "logging.csv" -Append -InputObject "Date log_type status"
# To add the column heading to a new file
Out-File "logging.csv" -InputObject "Date log_type status"
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten