I have the below script which basically zip, moves and delete logs files on a monthly basis, some users from this forums has helped me previously on adjusting a few lines, and that has worked as expected. Now, I would like to add futher functionality to the script.
#get the list of files in the original folder
#create a temporary folder using today's date
#decide how long back to go
#move the files to a temporary location
$CompressionToUse = [System.IO.Compression.CompressionLevel]::Optimal
#add the files in the temporary location to a zip folder
#Remove-Item $tempFinalFolder -RECURSE
I wonder if anyone can help me or show me how to add the below functionality to the script:
1. Email notification: Once the script has completed running an email need to be sent to a mailbox.
Many thanks in advance.
You could do yourself and us a favor and format your code as code. And even better would be when you indent your code accordingly. It makes it easier to read and to understand and to debug and .... 😉
Thanks for your feedback Olaf.
You must be logged in to reply to this topic.