Overview

Create a group managed service account

Services and scheduled tasks need an account to run as. A group managed service account (gMSA) is one whose password Windows sets and changes for you, so nobody knows it and nobody has to update it.

5 minute readFor IT leads, network managers and support providersReviewed 15 November 2026
What improves

Services run under an account whose password nobody knows.

Why it matters

Service passwords set by hand are rarely changed and are a common way in.

How you do it

Create the KDS root key, a host group and the account, then install it on each server.

Every name, address and value in this guide is an example. Replace them with your own.

Why use one

Ordinary service accountgMSA
PasswordSomeone chooses it and writes it downA long random password (240 bytes), known to nobody
ChangesWhen someone remembers, and the service breaks until it is updatedEvery 30 days, with no downtime
Who can use itAnyone who knows the passwordOnly the servers you name
Sign in at a keyboardPossibleNot possible

What you will have at the end

ItemExample
Service accountCONTOSO\svc-app-gmsa$ in CON-Service-Accounts
Host groupSG-CON-App-Hosts, holding the servers allowed to use it
Used byA Windows service or scheduled task on CON-APP-01

The route

  1. Create the KDS root key

    Once per forest, then a 10-hour wait.

  2. Create the host group and the account

    Name the servers that may use it.

  3. Prepare each server

    Restart, then test.

  4. Use it

    For a service, a scheduled task or the Cloud Sync agent.

Before this guide

You need a working domain and the OU structure from Design the OU structure.

Sources

Your progress is kept in this browser only.