Skip to content

Please help 3rd post Configmgr OSD Task sequence ; Success or Failure notification

Featured Replies

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.