TechBuzzPro

Windows Service Manager: Configure Alerts Step by Step

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You cannot configure service alerts directly in the Windows Services console (services.msc). That console only lets you start, stop, and change service properties; it has no built-in alerting. To get alerts when a service stops, crashes, or fails to start, you use the Windows Event Viewer's Attach Task to This Event feature, which triggers a task (email, popup, script, or log entry) when the service logs a specific event. This guide walks you through that method, plus a simpler built-in alternative using the Task Scheduler and a PowerShell script. You need Windows 10 or Windows 11 (steps are for desktop; Server editions have similar tools but different labels), an account with administrator rights, and basic familiarity with Event Viewer. Menu labels can differ slightly by Windows version and edition.

What You'll Need

  • A Windows 10 or Windows 11 PC with administrator access.
  • The exact name of the service you want to monitor (open Services, double-click the service, and note the "Service name" field, not the display name).
  • Optional: an email account with SMTP details if you want email alerts, or a local script if you prefer popups or log files.
  • Windows Task Scheduler (built-in) and Event Viewer (built-in).

Step-by-Step

  1. Find the service name. Press Windows+R, type services.msc, and press Enter. Locate your service, right-click it, and choose Properties. Write down the value in the "Service name" box (for example, Spooler for Print Spooler). Close the Properties window.
  2. Open Event Viewer. Press Windows+R, type eventvwr.msc, and press Enter. In the left pane, expand Windows Logs and click System.
  3. Filter for service events. In the right Actions pane, click Filter Current Log. In the "Event sources" dropdown, select Service Control Manager. Click OK. The middle pane now shows only service-related events.
  4. Trigger a test event (optional but recommended). Open Services again, right-click your service, and choose Stop (or Restart). Then return to Event Viewer and click Refresh in the right pane. You should see a new event with source Service Control Manager. Note its Event ID (common IDs include 7036 for state changes, 7031 for unexpected termination, and 7000 for start failures).
  5. Attach a task to the event. In Event Viewer, right-click the event you want to alert on and choose Attach Task to This Event. The Create Basic Task Wizard opens with the event details pre-filled. Click Next.
  6. Name the task. Give it a clear name like "Alert when Print Spooler stops" and click Next.
  7. Review the trigger. The wizard shows the event log and source. Click Next.
  8. Choose the action. Select Start a program if you have a script, or Display a message if you want a popup (note: Display a message may be disabled on newer Windows versions). For email, you will need a script because the wizard no longer offers a direct email action. Click Next.
  9. Configure the action. For a program, browse to your script (for example, a PowerShell .ps1 file) and add arguments if needed. For a message, type a title and text. Click Next.
  10. Finish and test. Check the box to open the task's properties when you click Finish. In the Properties window, go to the Conditions tab and clear "Start the task only if the computer is on AC power" if this is a laptop. Click OK. Then stop or restart the service again to confirm the alert fires.
  11. Alternative: use Task Scheduler directly. If you prefer not to use Event Viewer, open Task Scheduler (taskschd.msc), click Create Task, and on the Triggers tab add a trigger "On an event" with Log: System, Source: Service Control Manager, and the Event ID you noted. On the Actions tab, add your script or program. This gives you more control over conditions and multiple events.

Common Mistakes

  • Using the display name instead of the service name when filtering or scripting. The service name is the short internal name.
  • Attaching a task to the wrong Event ID. 7036 fires for every state change (including stops and starts), so you may get alerts when the service starts normally. Use 7031 or 7034 for unexpected stops if you only want failure alerts.
  • Forgetting to test the task. Always stop the service manually to confirm the alert works.
  • Leaving the default power condition, which prevents the task from running on battery.
  • Assuming the Services console itself can send alerts. It cannot; you must use Event Viewer or Task Scheduler.

Tips

  • Use a PowerShell script for email alerts. A simple script can read the event and send mail via SMTP. Store credentials securely, not in plain text.
  • Create separate tasks for different services so you can enable or disable them independently.
  • Check the Task Scheduler History tab (enable "All tasks history" if needed) to see whether your task ran and whether it succeeded.
  • If you need alerts for many services, consider a monitoring tool, but for a handful the built-in method is sufficient.
  • Keep a written record of the Event IDs you use; they are stable across Windows versions for Service Control Manager.

Troubleshooting

  • The task does not run. Open Task Scheduler, find your task, and check the Last Run Result. Common codes: 0x0 means success; 0x1 means incorrect function (often a script path issue). Also verify the task's user account has "Run whether user is logged on or not" set if needed.
  • No events appear in Event Viewer. Ensure the service is actually logging to the System log. Some third-party services log elsewhere. Check the service's properties in Services for any recovery settings.
  • Popup does not appear. The "Display a message" action is deprecated in newer Windows versions. Use a script that shows a message box or writes to a file instead.
  • Email script fails. Test the script manually from PowerShell. Check SMTP server, port, and authentication. Many email providers require app passwords or block less secure apps.
  • Task runs but no alert is received. Check the script's output or log file. Ensure the task's action is pointing to the correct file and that the file has execute permissions.

Frequently Asked Questions

Can I set up alerts directly in the Services console?

No. The Services console (services.msc) does not have an alerting feature. You must use Event Viewer's Attach Task or Task Scheduler.

What Event ID should I use for a service that stops unexpectedly?

Event ID 7031 indicates a service terminated unexpectedly. 7034 also indicates unexpected termination. 7036 is a general state change and fires for both starts and stops.

Can I get an email alert without a script?

Not with the built-in wizard. The Create Basic Task Wizard no longer offers a direct email action. You need a PowerShell or VBScript that sends email via SMTP.

Will this work on Windows Server?

Yes, the same Event Viewer and Task Scheduler features exist on Windows Server, though menu labels may differ slightly.

How do I monitor multiple services?

Create a separate task for each service, or use a single script that checks multiple services and sends one consolidated alert.

Does this require the service to be running as a specific user?

No. The alert task runs under the account you specify in Task Scheduler, independent of the service's own logon account.