Installation, Storage, and Compute with Windows Server 2016 — Question 200
You have a server named Server1 that runs Windows Server 2016.
The server has an application named App1. App1 writes entries to the Application event log when errors are encountered. The events have IDs of either 111 or
112.
You need to restart the service whenever either of these events is logged.
What should you do?
Answer options
- A. From Windows PowerShell, run the Get-SMServerEvent cmdlet and pipe the output to the Start-NetEventSession cmdlet
- B. From Event Viewer, create a subscription that has a filter for the event IDs.
- C. From Task Scheduler, use Create Task to create one task that includes triggers for both event IDs.
- D. From Windows PowerShell, run the Get-Event cmdlet and pipe the output to the Start-NetEventSession cmdlet.
- E. From Performance Monitor, add an Event Trace Session data collector that uses the Microsoft-Windows-Eventlog provider.
- F. From Event Viewer, create a custom that has a filter for the event IDs. parameter.
Correct answer: C
Explanation
The correct answer is C because Task Scheduler allows you to create a task that can respond to multiple triggers, in this case, the event IDs 111 and 112. The other options either do not provide the capability to restart a service based on event logging or involve tools that are not suited for this specific task.