Service Management automation for Windows Server 2012-Startup type setting, manual start or auto-start

Source: Internet
Author: User

Service Management automation for Windows Server 2012

Tags: Windows servers IDC room Windows Server 2012

First, the scene description:

Running a business-critical Windows Server or hosted in an IDC room, or hosted in a home company's room (DC), is a scenario in which a server is managed in such a way that when a service that runs a critical business is stopped, even if it is close to the data center, it cannot be processed in time. What's more, traveling outside or traveling?!

Based on the above, then, there is no way to automate the management services, when the service is off, you can automatically without manual participation in the case of the first time to detect the service when it is off, and run the command or action to open the service? the answer is YES!

Second, the way to solve:

Currently, most of the business-critical systems are running on Microsoft's server-level operating system, which has been built into the Event Viewer management Console since Windows Server 2008 was released. Launched a period of time and was hailed by the vast number of Microsoft server system enthusiasts of the Windows Server OS, more expanded and enhanced this feature.

The rollout of this feature is not only associated with scom 2012 in the System Center family, but also embodies the idea of "automation" management in the private cloud solution that it advocates. Next, let's look at how to automate service Management on Windows Server 2012.

the service Management Automation implementation on Windows Server 2012:

1. The installation steps for Windows Server version 2012 are omitted here, and most of the administrative functions after installation can be achieved through the Server Manager. The functions involved in the automation of service management in this article are implemented through this management console:

Figure 1: Server Manager console

Also available by: desktop-mouse move to lower left corner-start preview icon appears-left click (or right click)--In the tool Options window that appears (or in the context menu), select Computer Management:

Figure 2: Computer Management Console

The following are more detailed steps:

2. Running the DNS Server service on Windows Server 2012 is now lost for some reason. Open Event Viewer, System entries, and you will see that there is already a log record:

Figure 3:dns Server logging

3. Select the detailed event, right-click (or in the console in the lower right corner) to select "Attach task to this event", the purpose of this action is to automatically run a task to handle the corresponding action when this event occurs, in order to achieve automation:

Figure 4: Right-click Properties

4. In the Create Basic Task Wizard window, enter a custom, well-defined name for this task "Restart DNS Service":

Figure 5: Creating a basic task and naming

5. Keep the settings in the current interface unchanged, Next:

Figure 6: When the time has been recorded

6, in this window, select the task you want to perform ( from the options can be seen these and scom service alarm and Service recovery task is the same, if you choose to send e-mail, you can implement the mail alarm, with the help of the current mobile phone online, when the service is lost, you can also know in time ): Start the program:

Figure 7: Performing an action-startup program

7. Start the program window, enter the content shown in the "Programs and Scripts" box below (in 8 for details on why):

Figure 8: Input Scripts and parameters

8, this paragraph is a description, the introduction of service-related command line under the start and command:

A. Open the Services console, locate the DNS Server service, right-click the properties-service name, and make sure the name of this service is DNS ( not built-in services, but note the space between service names and the service name with double quotes in 7 ):

Figure 9: Service Name

B, open the Command Line window, use the Net.exe command (located in the c:\windows\system32\ directory), test start or stop, Ok, usage parameters no problem (fill in the relevant parameters 7):

Figure 10: Command mode to start or stop a service

9, complete the summary (Figure 11), if there is no problem, the task will be "scheduled task" in the Task Scheduler console in the Event Viewer task (Figure 12), you can view the corresponding execution status, etc., you can also do the actual need for this task to fine-tune:

Figure 11: Completing the summary

Figure 12: Event Viewer tasks in Task Scheduler

10, manually stop the DNS Server service, you will find that in just a few seconds, the DNS ServerE service is open again (if you do mail notification, you can also receive mail), how, the service management automation is so realized:

Figure 13: Test, auto-Open after manual stop

Excerpt from: http://rickyfang.blog.51cto.com/1213/1127574http://rickyfang.blog.51cto.com/1213/1127574

Service Management automation for Windows Server 2012-Startup type setting, manual start or auto-start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.