Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Managed Service Accounts

Direct answer

Managed service accounts (sMSA and gMSA) are AD accounts whose long, random passwords are changed automatically by Windows, removing static service account passwords that are often weak and never rotated.

When to use this

Use this when replacing static service account passwords with managed accounts.

First 30 seconds

1. Managed service accounts (sMSA) have automatic password management for one computer.

2. Superseded by gMSA for most cases.

3. No manual passwords.

4. Use for services on single hosts.

5. Check support by app.

Operational verification

AD manages password → host retrieves → service runs

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Using standalone MSAs where a service runs on several servers (needs gMSA).
  • Applications that cannot use MSAs because they ask for a password in a config file.
  • Forgetting to grant PrincipalsAllowedToRetrieveManagedPassword to the right hosts.
  • Not checking the KDS root key exists before creating gMSAs.
Platform / version applicability
Identity, authentication and access control
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformIdentity, authentication and access control
Scope / prerequisiteUse this when replacing static service account passwords with managed accounts.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

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.

observation · 1
Key points
  • Managed accounts rotate long passwords automatically.
  • sMSA is for one server; gMSA for many.
  • Not every application supports them.
Key checks
  • Get-ADServiceAccount -Filter * — MSAs
  • Test-ADServiceAccount <name> — usable on host
  • Install-ADServiceAccount <name> — install on host
ReferenceWhy it matters1 section · depth on demand

sMSA vs gMSA

sMSAgMSA
Used onOne computerMany computers (farms, clusters)
PasswordManaged by WindowsManaged by DCs (KDS root key)
Typical useOlder single-server servicesIIS farms, scheduled tasks, SQL

Most new deployments use gMSA. Not every application supports managed accounts; check vendor support first.

ReferenceHow it works1 section · depth on demand

In depth

Managed service accounts (MSA and the more common group MSA, gMSA) are AD accounts whose passwords are generated and changed automatically by domain controllers. Services use them without anyone knowing the password, removing password reuse, expiry outages and weak-password risks.

TypeUse
sMSA (standalone)One computer
gMSAMultiple hosts (clusters, farms, scheduled tasks)
dMSA (delegated MSA, Windows Server 2025)Replaces legacy service accounts with migration support

Restrict which computers can retrieve each gMSA password, and audit membership of the PrincipalsAllowedToRetrieveManagedPassword group — anyone in it can obtain the account's credentials.

ReferenceConfiguration & state1 section · depth on demand

Commands

Add-KdsRootKey -EffectiveImmediately          # lab; production: wait 10 hours
New-ADServiceAccount -Name svc-app -DNSHostName svc-app.corp.local `
  -PrincipalsAllowedToRetrieveManagedPassword "APP-Servers"
Install-ADServiceAccount -Identity svc-app     # on each host

Documented example, not captured output. Then set the service logon to CORP\svc-app$ with an empty password.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docIdentity, authentication and access control current

Authoritative/upstream documentation reviewed for bounded claims in Active Directory Security → Managed Service Accounts. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/windows/security/ · confidence 94%
Confirmation

Confirm action

Continue?