Jump to content


cmnd_ctrl

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

Recommended Posts

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)

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.