Installation, Storage, and Compute with Windows Server 2016 — Question 210
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 Event Viewer, use the Create Basic Task Wizard for each event ID.
- D. From Windows PowerShell, run the Get-Event cmdlet and pipe the output to the cmdlet. Start-NetEventSession parameter.
- F. From Event Viewer, create a custom view that has a filter for the event IDs.
- G. From Performance Monitor, add an Event Trace Session data collector that uses the Microsoft-Windows-Eventlog provider.
Correct answer: C
Explanation
The correct answer is C because using the Create Basic Task Wizard allows you to set specific actions, such as restarting a service, based on the occurrence of particular event IDs. Options A, B, D, F, and G do not provide a direct method to automate service restarts upon logging those specific events.