Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

gMSA

Direct answer

A gMSA (group managed service account) is an AD service account whose 240-character password is managed by the domain and retrievable only by authorized hosts, so services across several servers run without stored passwords.

When to use this

Use this when running services on several servers with a managed password.

First 30 seconds

1. gMSA: AD-managed passwords usable by multiple hosts.

2. Requires KDS root key.

3. Restrict PrincipalsAllowedToRetrieveManagedPassword.

4. Works for services, tasks, IIS, SQL.

5. Rotated automatically (30 days).

Operational verification

KDS → gMSA password → allowed hosts

Context & applicabilityCommon mistakes · platform/version boundaries
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
Key commandTest-ADServiceAccount -Identity svc-web
Scope / prerequisiteUse this when running services on several servers with a managed password.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checks Verify boundary
Test-ADServiceAccount -Identity svc-web    # on the host: should return True
Get-ADServiceAccount svc-web -Properties PrincipalsAllowedToRetrieveManagedPassword

If Test-ADServiceAccount is False, check the host is in the allowed group (and rebooted or klist purge -li 0x3e7 after group change) and that the KDS root key is effective (10 hours after creation in production).

Step 2 Common mistakes Narrow the fault
  • Hosts not allowed to retrieve the gMSA password (PrincipalsAllowedToRetrieveManagedPassword).
  • KDS root key missing.
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
  • Password is 240 characters and rotates automatically.
  • Only authorized hosts can retrieve it.
  • Requires a KDS root key.
Key checks
  • Get-ADServiceAccount -Filter * -Properties PrincipalsAllowedToRetrieveManagedPassword — gMSA and allowed hosts
  • Test-ADServiceAccount <gmsa> — works on host
  • Get-KdsRootKey — KDS root key exists
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Group Managed Service Accounts (gMSA) give services, scheduled tasks and application pools a domain identity whose password is generated and rotated automatically by Active Directory (every 30 days by default). Nobody knows the password, so it cannot be leaked, reused or cracked from a weak choice.

Add-KdsRootKey -EffectiveImmediately          # once per forest (wait for replication in production)
New-ADServiceAccount -Name gmsa-netsync -DNSHostName gmsa-netsync.corp.example.com `
  -PrincipalsAllowedToRetrieveManagedPassword 'SG-NetSync-Hosts'
Install-ADServiceAccount gmsa-netsync          # on the host
Test-ADServiceAccount gmsa-netsync

Limit PrincipalsAllowedToRetrieveManagedPassword to the exact hosts that run the service, since anyone in that group can read the password.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Setup

Add-KdsRootKey -EffectiveImmediately          # once per forest; wait for replication
New-ADServiceAccount -Name svcWeb -DNSHostName svcWeb.example.com `
  -PrincipalsAllowedToRetrieveManagedPassword "WebServers"
Install-ADServiceAccount svcWeb               # on each server
Test-ADServiceAccount svcWeb

Documented example, not captured output. Configure the service to run as EXAMPLE\svcWeb$ with an empty password.

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 → gMSA. 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?