How to Audit Windows Service Activity: Step-by-Step
In this article
To audit Windows service activity, enable the relevant audit policies and then review the Security log or use a dedicated monitoring tool. The quickest built-in method is to turn on Audit Process Creation with command-line logging, and Audit Other Object Access Events to catch service start and stop events, then filter Event ID 4688 and 4697 in Event Viewer. For ongoing visibility, consider a lightweight script or a third-party service monitor. This guide walks through the practical steps using only built-in Windows tools, and explains what each setting actually records so you can decide how much noise you want.
What You'll Need
- Administrator rights on the Windows PC or server you want to audit.
- Access to Local Security Policy (secpol.msc) or the Group Policy Editor (gpedit.msc) — on Home editions, use the registry method described in Step 2.
- Event Viewer (eventvwr.msc), which is included with Windows.
- Optional: PowerShell for filtering and exporting events, and a text editor for saving a filter XML.
Menu labels can differ slightly by Windows version, edition and region, so if a label does not match exactly, look for the closest equivalent.
Step-by-Step
- Open Local Security Policy. Press Win+R, type
secpol.mscand press Enter. If you are on Windows Home or the snap-in is missing, skip to the registry note at the end of this step. Navigate to Security Settings > Advanced Audit Policy Configuration > System Audit Policies > Detailed Tracking. - Enable Audit Process Creation. Double-click “Audit Process Creation”, tick Success (and Failure if you want to see blocked attempts), then click OK. This records every new process, including service executables when they launch. On Home editions, you can set the same policy through the registry: create or edit
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Auditand setProcessCreationIncludeCmdLine_Enabledto 1, then enable the “Audit Process Creation” policy viaauditpolif available. If the policy is not present on your edition, the registry alone will not generate events; use the Local Security Policy method on a supported edition. - Enable command-line logging (optional but useful). In the same Detailed Tracking folder, open “Audit Process Creation” properties and tick “Include command line in process creation events” if your build exposes it there; otherwise set the registry value from the previous step. This adds the full command line to Event ID 4688, which helps you tell a legitimate service launch from a suspicious one.
- Enable Audit Other Object Access Events. Go to Security Settings > Advanced Audit Policy Configuration > System Audit Policies > Object Access and double-click “Audit Other Object Access Events”. Tick Success and Failure, then OK. This policy is what generates Event ID 4697 when a new service is installed, and it also helps capture service-related object access.
- Apply the policy and refresh. Close Local Security Policy. Open Command Prompt as administrator and run
gpupdate /forceto apply the settings immediately. If you changed the registry, restart the computer to be safe. - Open Event Viewer and locate the Security log. Press Win+R, type
eventvwr.mscand press Enter. Expand Windows Logs > Security. The log can be large; use the Filter Current Log action on the right to narrow it down. - Filter for service-related events. In the filter dialog, enter these IDs in the “Includes/Excludes Event IDs” box:
4688, 4697, 7045. Event 4688 shows process creation (including service binaries), 4697 shows service installation, and 7045 (from the System log) shows a service was installed. Click OK. If you want only service starts and stops, also add 7036 from the System log, which records when a service enters the running or stopped state. - Read a sample event. Click an event to see details. For 4688, look at “New Process Name” and “Command Line”. For 4697, look at “Service Name”, “Service File Name” and “Service Type”. For 7036, the message names the service and its new state. This is the core of service activity auditing: who launched what, when, and from where.
- Export or save the filtered view. With the filter applied, use “Save Filtered Log File As” to keep a copy, or use PowerShell to query and export. For example:
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4688,4697} | Export-Csv C:\temp\service-audit.csv -NoTypeInformation. Run PowerShell as administrator. This gives you a searchable record without scrolling Event Viewer. - Set up ongoing review. Decide how often you will check the log (daily for a server, weekly for a workstation). Use a custom view in Event Viewer (right-click Custom Views > Create Custom View) with the same event IDs so you can reopen it quickly. For long-term retention, increase the Security log size (right-click Security > Properties) or forward events to a central collector if you have one.
Common Mistakes
- Enabling only Audit Process Creation and expecting to see service installs. Service installation is a separate event (4697) and needs the Object Access policy.
- Forgetting to run
gpupdate /forceor restart, then assuming the policy did not work. - Filtering the wrong log. 4688 and 4697 live in the Security log; 7036 and 7045 live in the System log. Mixing them up makes it look like nothing was recorded.
- Leaving the Security log at its default size. On busy machines, events roll over quickly and you lose the evidence you need.
- Enabling command-line logging on a system that handles sensitive data without considering that command lines can contain passwords or tokens. Review who can read the Security log.
Tips
- Start with Success auditing only. Failure auditing on process creation can generate a lot of noise from legitimate blocked launches.
- Use a custom view instead of re-filtering every time. Save the view with a clear name like “Service Activity”.
- Correlate 4688 with 4697: a 4697 tells you a service was installed, and a nearby 4688 shows the process that did it.
- If you only care about service state changes, 7036 in the System log is lighter weight than full process auditing.
- For servers, consider forwarding Security events to a central log server so a local log wipe does not erase your audit trail.
Troubleshooting
- No 4688 events after enabling the policy. Confirm you are looking in the Security log, not System. Run
gpupdate /force. Check that the policy is actually applied by opening Local Security Policy again. On Home editions, the snap-in may be unavailable; use a supported edition or a third-party tool. - 4697 events are missing. The “Audit Other Object Access Events” policy is the one that produces them. Verify it is enabled for Success. Also check that the service install actually happened after you applied the policy.
- Command line is blank in 4688. The “Include command line in process creation events” setting is not enabled. Set it in policy or registry, then apply and test with a new process.
- Events disappear quickly. The Security log is too small. Increase its maximum size in the log properties, or export filtered events regularly.
- PowerShell query returns nothing. Run PowerShell as administrator and check the event IDs and log name. A typo in the hashtable silently returns no results.
Frequently Asked Questions
Do I need to install anything to audit service activity?
No. Windows includes Local Security Policy, Event Viewer and PowerShell, which are enough for basic auditing. Third-party tools can add alerting and retention but are optional.
What is the difference between Event ID 4688 and 4697?
4688 records a process being created, including the service executable when it launches. 4697 records a new service being installed. Use both together to see installation and execution.
Can I audit service activity on Windows Home?
Local Security Policy is not included in Home editions, and the advanced audit policies may be limited. You can still use Event Viewer and PowerShell for events that are recorded, but full process creation auditing typically requires Pro, Enterprise or Server editions.
Will this slow down my PC?
Process creation auditing adds some overhead because every process launch writes an event. On a typical workstation the impact is small, but on a high-traffic server enable only the policies you need and monitor log size.
How long are these events kept?
Until the log reaches its maximum size and overwrites the oldest entries. Increase the log size or export events regularly if you need a longer history.
Can I see who started or stopped a service?
Event 7036 shows the service name and state change but not always the user. Pair it with 4688 to see the process and account that triggered the change, or enable additional logon auditing for more context.