Service Accounts
Cheat sheet · https://pcornel.dk/topic.php?topic=6260
Answer
A service account is an identity used by software rather than a person: a Windows service, scheduled task, application pool, script or cloud workload. Modern platforms replace static passwords with managed identities (gMSA/dMSA in AD, managed identities in Azure).
Remember
One service account per workload, least privilege, no interactive logon, an owner and a rotation story. AD user accounts with SPNs and old passwords are Kerberoasting targets. gMSA rotates passwords automatically; dMSA (Windows Server 2025) binds the account to machine identity; Azure managed identities have no secret you can see.
First checks
Get-ADServiceAccount -Filter * -Properties PrincipalsAllowedToRetrieveManagedPassword— gMSAs and who may use them.Test-ADServiceAccount <name>on the host — can this host use the gMSA?setspn -L <account>— SPNs registered on an account.Get-ADUser -Filter {ServicePrincipalName -like "*"} -Properties PasswordLastSet— user accounts with SPNs and old passwords.az identity list/ Enterprise applications (managed identities) — cloud workload identities.
Verify in this order
workload → configured identity (account, gMSA, managed identity) → credential retrieval (KDS, IMDS, vault) → authentication (Kerberos/token) → target authorization → audit
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6260