A while ago me and fellow MVP Mikael Nystrom created a small vbscript that sends an email when the deployment is completed… Here it is 🙂
Update 2011-06-30: Added the testmail.vbs script for troubleshooting purposes, this is just the CDO.Message code, no MDT involved at all. Run via cscript.exe testmail.vbs to verify your smtp server is correctly configured.
- Download and extract the ZTISendmail.zip file to a folder, say D:\ZTISendMail
- Using Deployment Workbench, create an application using the following settings
Application with source files
Application name: ZTISendmail
Source Directory: D:\ZTISendMail
Specify the name of the directory that should be created: ZTISendmail
Command Line: cscript.exe ZTISendmail.wsf
Working directory: .Applications\ZTISendmail
- Add the ZTISendmail application as the final step of the task sequence (se below screenshot)
- Configure your rules (customsettings.ini) using the sample customsettings.ini file (content below).
[Settings] Priority=Default, SendMail Properties=OSDSendMailFrom,OSDSendMailTo,OSDSendMailSubject,OSDSendMailBody,OSDSendMailSMTPServer,OSDSendMailIncludeBDDLog [Default] _SMSTSOrgName=%OSDComputername% soon to be in service... OSInstall=Y [SendMail] OSDSendMailFrom=MDT01@deploy.net OSDSendMailTo=Someone@dot.net OSDSendMailSubject=Mail from MDT01 OSDSendMailBody=The computer: %OSDComputerName% was installed at: #Now()# OSDSendMailSMTPServer=mail.deploy.net OSDSendMailIncludeBDDLog=YES