Which managed service account type fits a service, its requirements such as the KDS root key, and how Windows Server 2025 delegated MSAs migrate old accounts.
From Ultra Transcenders AZ-802 by Tony Rough (coming November 2026)
A service account provides the security context a service runs in. Windows Server 2025 offers four managed options alongside the traditional domain user account, and choosing between them is a core exam skill.
| Account type | Scope | Password or key management | Typical use |
|---|---|---|---|
| Traditional (standard) user account | Any computer | Administrator sets and rotates it manually; follows domain or fine-grained password policy | Only when the service supports nothing better |
| Standalone managed service account (sMSA) | Services on a single computer; not shareable and not for cluster nodes | Windows rotates it automatically (every 30 days); can be reset with Reset-ADServiceAccountPassword |
Isolating a critical service on one server |
| Group managed service account (gMSA) | One or many servers, including server farms behind a load balancer | Domain controllers compute the password from the KDS root key; default rotation 30 days, set only at creation with ManagedPasswordIntervalInDays |
Farms, load-balanced apps, scheduled tasks, IIS app pools |
| Delegated managed service account (dMSA) | Machine identities mapped in AD | Fully randomised secret derived from the machine account and held only by the DC; can be protected by Credential Guard | Replacing an existing traditional service account and blocking credential harvesting (kerberoasting) |
| Virtual account | Single computer, local | None; uses the computer account (domain\computer$) on the network |
Local services, such as a SQL Server instance (NT SERVICE\<name>) |
sMSAs were introduced in Windows Server 2008 R2, gMSAs in Windows Server 2012 (the Key Distribution Service doesn’t run on earlier versions) and dMSAs in Windows Server 2025. sMSAs and gMSAs both provide automatic password management, simplified service principal name (SPN) management and delegation of account management to non-administrators.
Common trap: Choosing an sMSA for a service that runs on several load-balanced servers - an sMSA can’t be shared among computers or used across cluster nodes; mutual authentication across instances needs one principal, which is what a gMSA provides.
Domain controllers need a Key Distribution Service (KDS) root key before they can generate gMSA passwords. It is created once per forest with Add-KdsRootKey by a member of Domain Admins or Enterprise Admins. Despite its name, -EffectiveImmediately doesn’t make the key usable everywhere at once: DCs wait up to 10 hours from creation so that the key replicates to every DC. Only in a single-DC test environment should the effective time be backdated with -EffectiveTime ((Get-Date).AddHours(-10)). Creating more than one root key, or deleting and recreating it, causes failures.
Add-KdsRootKey -EffectiveImmediately # once per forest; usable after replication (up to 10 hours)
New-ADServiceAccount -Name svcWeb -DNSHostName svcWeb.corp.example `
-PrincipalsAllowedToRetrieveManagedPassword 'WebServers'
New-ADServiceAccount -Name svcApp -RestrictToSingleComputer # sMSANew-ADServiceAccount creates a gMSA by default; RestrictToSingleComputer creates an sMSA, CreateDelegatedServiceAccount creates a dMSA, and RestrictToOutboundAuthenticationOnly creates a gMSA usable only for outbound (client) connections. The cmdlet doesn’t work against a read-only domain controller. Managed service accounts depend on Kerberos encryption types, so AES should always be configured for them; a host that doesn’t support RC4 fails authentication if the account’s msDS-SupportedEncryptionTypes attribute is missing.
Common trap: Running
Add-KdsRootKey -EffectiveImmediatelyin a multi-DC production domain and expecting to create a working gMSA straight away - DCs allow up to 10 hours for the root key to replicate; backdating the effective time is only for single-DC test labs.
A dMSA can be created standalone or used to supersede an existing traditional service account. Migration runs in two steps: Start-ADServiceAccountMigration links the old account (identified by its distinguished name) to the dMSA, and while the migration is running the dMSA learns which devices use the account. Complete-ADServiceAccountMigration copies the SPNs, delegation settings and authentication policy assignments to the dMSA and disables the original account. After that, authentication with the old password is blocked and requests are redirected to the Local Security Authority to authenticate as the dMSA.
Key constraints:
A traditional service account follows the domain password policy in the Default Domain Policy unless a fine-grained password policy overrides it. Fine-grained policies are stored as Password Settings Objects (PSOs) in the Password Settings Container (under System in ADAC), need a domain functional level of Windows Server 2012 or higher, and apply only to user objects and global security groups, not to OUs. Each PSO requires a name and a precedence value. Get-ADUserResultantPasswordPolicy (or View Resultant Password Settings in ADAC) shows which PSO wins for a user. Password and lockout policy design is covered in Chapter 13, Securing Active Directory Domain Services.
Common trap: Linking a fine-grained password policy to the OU that holds service accounts - PSOs can’t be applied to OUs; apply them to the user objects or to a global security group that contains them.
This note is one section of Ultra Transcenders AZ-802: Administering Windows Server, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.
Due on Amazon in November 2026, in Kindle and paperback editions.
About the book · AZ-802 terms in the glossary · All AZ-802 study notes
Which operations master roles exist per forest and per domain, what each does and the placement guidance for each.
When to deploy an RODC, how staged installation works and how the allowed and denied groups decide which passwords are cached.
The LSDOU order, which GPO wins a conflict, and how Block Inheritance, Enforced and link order change the result.
How the two DHCP failover modes split or reserve addresses, what MCLT does and how relay agents fit in.
What SMB over QUIC needs on the server, the certificate rules, which editions support it and how client access control works.
The Storage Replica topologies, when to use synchronous or asynchronous mode, log volume requirements and the Standard edition limits.
How Windows LAPS rotates and stores local administrator passwords, its policy settings, encryption and the cmdlets to retrieve them.