cmnd_ctrl Posted January 19, 2012 Report post Posted January 19, 2012 Please help 3rd post on this. I've got this far and I need help to pull my OSDCoumputername and email me with it. Not the MININT name which it keeps emailing me with. I have a question about your post regarding Configmgr OSD Task sequence ; Success or Failure notification at http://scug.be/blogs/sccm/archive/2010/10/01/configmgr-osd-task-sequence-success-or-failure-notification.aspx I'm using the TSSucceeded_Email_Notification and it works for me but the issue I have run into is that it emails me with the following showing a MININT name which is not correct and I have tested several times. I'm using a Collection Variable of OSDComputerName in which I enter in the proper name for instance WIN7TEST1 and it deploys the machine and joins to the domain with that name. Can you help me with updating the powershell script so it will enter in the proper OSDComputerName and email me. Thanks so much The OSD Task Sequence "Windows 7"" is * SUCCEEDED * op MININT-O5OF29B **********Code Snippet – SUCCEEDED ************** param([string]$strComputerName) $erroractionpreference = "SilentlyContinue" $strSMTP = "Your SMTP server " $strSubject = $strComputerName+": OS Deployment Succeeded" $strBody = @" The OSD Task Sequence "The name of your tasksequence"" is * SUCCEEDED * op $strComputerName "@ $MailMessage = New-Object System.Net.Mail.MailMessage $SMTPClient = New-Object System.Net.Mail.smtpClient $SMTPClient.host = $strSMTP $Sender = New-Object System.Net.Mail.MailAddress("zzz@Yourcompany.zzz ", "SCCM") $Recipient = New-Object System.Net.Mail.MailAddress("zzz@Yourcompany.zzz ", "ZZZ") $MailMessage.Sender = $Sender $MailMessage.From = $Sender $MailMessage.Subject = $strSubject $MailMessage.To.add($Recipient) $MailMessage.Body = $strBody $SMTPClient.Send($MailMessage) Quote Share this post Link to post Share on other sites More sharing options...
anyweb Posted January 20, 2012 Report post Posted January 20, 2012 hi there, I havn't implemented this, it's a post from Kenny, so you are receieving a mail but it's got the wrong computername, is that your only problem ? Quote Share this post Link to post Share on other sites More sharing options...