Skip to main content

Service & Admin Accounts

Runbook Azure

DOCUMENT CATEGORY: Runbook
SCOPE: Service and administrative accounts
PURPOSE: Create break-glass and gMSA accounts
MASTER REFERENCE: Microsoft Learn - AD Prerequisites

Status: Active

Overview​

Create supplemental break-glass admin accounts and optional gMSA scaffold for enterprise environments.

What This Accomplishes​

  • Break-glass administrative accounts for emergency access
  • Group Managed Service Accounts (gMSA) for secure service authentication
  • Secure password management and storage
  • Account configuration following security best practices
info

The active directory information in these documents should have been decided in the planning phase and discovery phases. These are just examples. Please update your scripts with the right OU information, right security groups, DNS, etc.

Prerequisites​

  • OU structure created (Step 1)
  • Domain admin access for account creation
  • Secure password storage solution (vault)
  • Only for the optional gMSA scaffold: a KDS root key that has replicated to all domain controllers (see below)

KDS root key (optional gMSA scaffold only)​

The break-glass account does not need a KDS root key. The Microsoft Learn 2610 Azure Local AD-preparation and custom-AD articles do not mention a gMSA or a KDS root key, so this runbook set treats the gMSA scaffold as optional. If you create the gMSA, a KDS root key must exist first (one per forest). Check with Get-KdsRootKey, and create one only if none exists.

EnvironmentCommandWait
Production or any lab with more than one domain controllerAdd-KdsRootKey -EffectiveImmediatelyWait 10 hours so the key replicates to all domain controllers before creating the gMSA
Single domain controller test environment onlyAdd-KdsRootKey -EffectiveTime (Get-Date).AddHours(-10)None. Microsoft documents this backdating technique for single-DC tests only and says not to use it in production

Source: Create a Key Distribution Service (KDS) root key. Do not create more than one root key per forest.

Legacy gMSA wording in the Environment Checker article

The Learn 2610 Environment Checker article still describes the Active Directory validator as checking that the preparation tool created gMSAs. The 2610 AD-preparation article documents only New-HciAdObjectsPreCreation -AzureStackLCMUserCredential ... -AsHciOUName ... from the AsHciADArtifactsPreCreationTool module (install version 2402 and uninstall earlier versions first). This repo follows the AD-preparation article; treat the gMSA wording as legacy and rely on the validator result in your environment.

Values from infrastructure.yml​

The values for this task come from infrastructure.yml (schema 5). Every key, with its type, default and example, is in the variables reference.


Account Creation​

Lifecycle Manager (LCM) user created in Step 1. Add break‑glass admin and optional gMSA scaffold.

  1. In Active Directory Users and Computers, inside instance OU create user: adm-AzureLocal-BreakGlass-<clusterId>.
  2. Set: Password never expires; User cannot change password; store password securely (vault).
  3. (Optional gMSA) After a KDS root key exists and has replicated (see the KDS table above), create gMSA via AD Administrative Center (if supported) targeting computer principals later.

Verification​

Get-ADUser -LDAPFilter "(sAMAccountName=adm-AzureLocal-BreakGlass-*)" -SearchBase $OuPath | Select SamAccountName,Enabled
Get-ADServiceAccount -LDAPFilter "(sAMAccountName=gMSA-AzureLocal-*)" -SearchBase $OuPath | Select Name,Enabled

Notes​

  • LCM user is created in Step 1; this step adds supplemental accounts
  • Break-glass accounts should have passwords stored securely in a vault
  • gMSA requires a KDS root key and replication to complete first (10 hours in production). KDS root key guidance lives here, not in Task 01
  • Use unique cluster IDs to avoid naming conflicts

Validation Checklist​

  • Break-glass admin account created
  • Password stored securely in vault
  • Account properties configured correctly
  • gMSA created if required
  • Retrievers group configured for gMSA
  • Accounts enabled and accessible

Next Steps​

After creating accounts, proceed to Task 5 - Group Assignments to assign accounts to security groups.

Troubleshooting​

Common Issues​

Account Creation Fails: Check OU permissions and naming policies.

gMSA Creation Fails: Ensure a KDS root key exists and has replicated to all domain controllers. With -EffectiveImmediately wait 10 hours in production; use the -10 hours backdating only on a single-DC test domain.

Password Storage: Verify vault access and security policies.

Support Resources​


Data verified with internal source [Azure Local Provisioning Runbook] and Docusaurus documentation release note dated 2025-12-08.



Alternatives​

The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.

← Task 03: DNS Node A Records↑ Part 3: On-Premises ReadinessTask 05: Group Assignments →

Version Control​

VersionDateAuthorChanges
1.02026-01-31Azure Local CloudInitial document
1.12026-03-03Azure Local CloudStandardized runbook format
1.2.02026-11-08Azure Local CloudKDS root key guidance moved here from Task 01 and scoped to the optional gMSA; production vs single-DC lab guidance
1.3.02026-11-16Azure Local CloudThe script section matches New-ADAccounts.ps1 (the domain join account from infrastructure.yml, parameters, exit codes)

End of Task