Windows Server 2012 create daily task and email notification ?

techresearch7777777 1,981 Reputation points
2021-03-16T22:01:42.697+00:00

Hello, within our Windows Server 2012 I would like to create a daily task that would copy all of the contents within some folders from local location to a different machine shared location and send me an email notification if it succeeded or failed.

I have a domain login account that it can run under and do this.

Are there any handy scripts or step by steps out there that I can use to achieve this?

Thanks in advance.

Windows for business | Windows Server | User experience | Other
{count} votes

5 answers

Sort by: Most helpful
  1. Anonymous
    2021-03-16T22:11:36.807+00:00

    The TechNet Script gallery was closed a few months ago but some were migrated here.
    https://github.com/MicrosoftArchive
    https://learn.microsoft.com/en-us/samples/browse/

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  2. techresearch7777777 1,981 Reputation points
    2021-03-17T19:30:27.113+00:00

    Thanks for the replies and for the links.

    I searched both and didn't seem to find anything related to Windows Task Scheduler.

    Any other links?

    0 comments No comments

  3. Anonymous
    2021-03-17T19:35:11.993+00:00

    Some examples here.
    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/copy-item?view=powershell-7.1

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  4. techresearch7777777 1,981 Reputation points
    2021-03-25T20:50:56.253+00:00

    Thanks DSPatrick.

    But so far I don't see how to attach to an email to notify if success or failed.

    0 comments No comments

  5. Anonymous
    2021-03-25T20:58:09.92+00:00

    You can use Send-MailMessage
    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.1

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.