MDT: Deployment Success/Error Mail notification

Stefan Wehrli 1 Reputation point
2022-03-18T09:42:08.277+00:00

MDT: Deployment Success/Error Mail notification

Hello Community, I would like to extend our MDT mail notification and came across this link:

https://www.systanddeploy.com/2017/03/mdt-monitoring-deployment-successerror.html

I would like to call the whole thing as a tasksequence at the end of the deployment, and not have to enter the computer name manually, but that the $env:COMPUTERNAME is taken from MDT.

Can someone help me to adapt the script so that the XML file with the parameters is already part of the PS script, and that as mentioned above the $env:COMPUTERNAME is taken instead of the manual entry.

I thank you already for your support.

Best thanks
Stefan

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
859 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,462 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 43,061 Reputation points Microsoft Vendor
    2022-03-21T06:39:39.593+00:00

    Hi, @Stefan Wehrli

    Thank you for posting in Microsoft Q&A forum.

    It seems it's difficult to get the computer name and add the computer to the script because the script is running on the other computer.
    We may consider to run a script on the computer we are deploying, such as: add a ZTISendmail application as the final step of the task sequence like this article:
    https://www.deploymentresearch.com/configure-mdt-2010-to-send-an-email-when-deployment-is-completed/

    You may also try this guidance:
    https://community.spiceworks.com/how_to/138021-e-mail-notifications-for-mdt
    (Please Note: Since the website is not hosted by Microsoft, just for your reference.)


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.