Service Accounts
Cheat sheet · https://pcornel.dk/topic.php?topic=3017
Answer
A service account is the security identity under which a Windows service process or service instance runs. That identity determines local privileges, group memberships, file/Registry access and how network authentication is presented to remote systems.
Remember
- Service identity is a security boundary, not just a username field.
- LocalSystem has extensive local rights and represents the computer to many network resources; it is not a safe default for every workload.
- LocalService and NetworkService are built-in lower-privilege identities with different network behavior.
- Managed/virtual service identities reduce password-management burden when supported.
- Changing a service account changes runtime access and can also affect profiles, SPNs/remote auth and stored credentials.
First checks
Get-Service <name> | fl *— status, start type, dependenciesGet-CimInstance Win32_Service -Filter "Name='<name>'" | Select StartName,PathName,StartMode— account, path and modesc.exe qc <name>— configuration in CMDGet-WinEvent -FilterHashtable @{LogName='System';ProviderName='Service Control Manager'} -MaxEvents 20— SCM events
Verify in this order
service account → logon as service right → token → access to local and network resources
Where it usually breaks
First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.
Windows Services → Service Accounts reference map
| Item | Meaning | Evidence boundary |
|---|---|---|
| LocalSystem | Highly privileged built-in local identity | use only where design requires it |
| LocalService | Low-privilege built-in identity | limited local rights; network identity differs from LocalSystem |
| NetworkService | Low-privilege built-in identity | designed for network-capable service scenarios |
| Virtual/managed account | Service-specific managed identity | reduces manual password handling |
| Domain/gMSA identity | Directory-backed service principal | remote authorization/Kerberos considerations |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3017