Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Windows 2012 Task Scheduler

Posted on 2014-03-17
7
Medium Priority
?
520 Views
Last Modified: 2014-04-20
Hi.  Windows 2012 no longer supports sending of an email in Task Scheduler therefore, I need to find a way to have an email generated when the server is rebooted.  Is this possible in Powershell and then call a powershell script on reboot?  Or perhaps a tool such as blat and  call blat?  Thx.
0
Comment
Question by:rrsmithab
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 10

Expert Comment

by:Scott Thomson
ID: 39935896
Can i possibly ask you a question. What is the reason you would like a server to notify you of a reboot? do you not have software such as solarwinds or SCOM systems?
0
 
LVL 23

Expert Comment

by:Mysidia
ID: 39935923
Personally;  I would suggest you  have monitoring software, such as  PRTG, Spiceworks, Nagios, ManageEngine Opmanager,  Solarwinds,  WhatsUp, or SCOM, on  another server to detect the reboot.      What happens when the server begins to reboot,  but  does not come back online  --- accidental shutdown,  or hang while shutting down, instead of successful reboot?   Then  you won't get an e-mail, that's what.....

I believe you can move this  e-mail thing over to 2012 by creating a VBScript;  .VBS file in notepad, and  schedule the VBScript,  though.

http://forums.asp.net/t/1618178.aspx?How+to+create+and+emails+Script+in+VBScript+

Imports System.Net.Mail
Imports System.Net

Dim Dest As New System.Net.Mail.MailAddress("recipient@example.com")
Dim msg As New System.Net.Mail.MailMessage
Dim smtp As New System.Net.Mail.SmtpClient

smtp.Host = "mymailserver.example.com"

msg.body = "Your message here"
msg.From = New Net.Mail.MailAddress("sender@example.com")
msg.Priority = Net.Mail.MailPriority.High
msg.Subject = "Hello, there!"

msg.IsBodyHtml = False
msg.To.Clear()
msg.To.Add(Dest)

smtp.send(msg)
0
 

Author Comment

by:rrsmithab
ID: 39975634
Thanks for trying to save me some work but there is an issue with the code and it failed.  The reason we want to do this is a safety net or plan B in case notifications don't go out.  We had a server reboot but neither vmware nor Opsview caught the reboot.  But it's in the logs of the server.
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Accepted Solution

by:
rrsmithab earned 0 total points
ID: 39986469
Solution is that Powershell has a sendmail cmdlet that works in Task scheduler.  Thanks to everyone for their assistance.
0
 
LVL 10

Expert Comment

by:Scott Thomson
ID: 39986573
No worries, glad you managed a solution
0
 

Author Comment

by:rrsmithab
ID: 39992064
Thanks.
0
 

Author Closing Comment

by:rrsmithab
ID: 40011150
Found solution on my own.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was assigned the task of performing a hardware refresh in the datacenter. The previous Windows 2008 systems were connected to the SAN via fiber channel HBA’s and among other thing, had PowerPath installed in order to provide sufficient f…
I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question