Use Service Accounts when a service starts but cannot access a file/share/database/network resource, when credentials have changed, or when you need to minimize privileges for a background service.
Service Accounts
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.
1. Which account? Win32_Service StartName.
2. LocalSystem / LocalService / NetworkService / gMSA / domain user?
3. Needs network access → NetworkService or a (g)MSA.
4. Password changed for a domain account → service fails to start (Event 7038).
5. Prefer gMSA: Test-ADServiceAccount <gmsa>.
service account → logon as service right → token → access to local and network resources
Inspect the exact local/remote authorization boundary for the service identity with least-privilege remediation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Do not switch to LocalSystem merely to “make it work” without proving a permission boundary. Do not put passwords into scripts/logs. Do not assume a service account has an interactive user profile or the same mapped drives/environment as an interactive session.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Read the configured account, start/restart the service, then confirm process/service token where possible. Reproduce the exact denied operation and capture local/remote authorization evidence. Prefer granting the minimum required permission to the service identity instead of elevating the whole service.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- 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.
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
ReferenceWhat it is1 section · depth on demand
Core model
SCM can start a service in a configured account context. The resulting token controls local access and affects how the service authenticates remotely. A service can therefore be fully RUNNING but fail its workload because the account lacks file, registry, certificate, share, database or network rights.
ReferenceImportant terms & boundaries2 sections · depth on demand
Runtime / control boundary
Separate the configured account string from the runtime token. Account changes take effect on a new service logon/start. Built-in service identities have special semantics; do not infer their network identity from the friendly name alone. For directory-backed accounts, password/SPN/delegation behavior adds further dependencies.
In depth
Service account choice:
| Account | Network identity | Use |
|---|---|---|
| LocalSystem | Computer account | OS services needing full rights (avoid for apps) |
| LocalService | Anonymous | Low-privilege local services |
| NetworkService | Computer account | Low privilege, needs network auth |
Virtual account NT SERVICE\x | Computer account | Per-service identity (SQL Server default) |
gMSA (CORP\svc-app$) | Own AD identity, auto-rotated password | Domain apps, clustered services |
| Domain user | Own identity, manual password | Legacy; rotate and protect |
New-ADServiceAccount -Name svc-app -DNSHostName svc-app.corp.example.com -PrincipalsAllowedToRetrieveManagedPassword 'APP-Servers'
Install-ADServiceAccount svc-app; Test-ADServiceAccount svc-app
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Windows Services → Service Accounts. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/win32/services/services · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Windows Services → Service Accounts reference map
Fast lookup boundaries for Windows Services → Service Accounts.
| 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 |