Pcornel
Windows · Windows Services

Service Accounts

Cheat sheet · https://pcornel.dk/topic.php?topic=3017

Back to the Topic

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, dependencies
  • Get-CimInstance Win32_Service -Filter "Name='<name>'" | Select StartName,PathName,StartMode — account, path and mode
  • sc.exe qc <name> — configuration in CMD
  • Get-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

ItemMeaningEvidence boundary
LocalSystemHighly privileged built-in local identityuse only where design requires it
LocalServiceLow-privilege built-in identitylimited local rights; network identity differs from LocalSystem
NetworkServiceLow-privilege built-in identitydesigned for network-capable service scenarios
Virtual/managed accountService-specific managed identityreduces manual password handling
Domain/gMSA identityDirectory-backed service principalremote 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

Confirmation

Confirm action

Continue?