Study guide
2.2 Service Account Types & Group Managed Service Accounts (gMSA)
Administering Windows Server Hybrid Core Infrastructure AZ-800
Track your progress as you read
Finished sections get a check mark.
1 Introduction & Exam Overview
About Exam AZ-800: Format, Scoring & the September 2026 Retirement
2 Chapter 1: Active Directory Domain Services Architecture & Deployment
1.1 Deploying & Managing Domain Controllers On-Premises 1.2 Domain Controllers in Azure IaaS & Virtualized DC Cloning 1.3 Read-Only Domain Controllers (RODCs) & Password Replication Policies 1.4 Flexible Single Master Operation (FSMO) Roles & Troubleshooting 1.5 Active Directory Sites, Subnets & Site Link Topology 1.6 AD DS Replication: Topology Generation, Convergence & Diagnostics 1.7 Forest and Domain Trust Relationships
3 Chapter 2: AD DS Security Principals, Service Accounts & Domain Join
2.1 Managing Users, Groups & Objects in Multi-Domain and Multi-Forest Environments 2.2 Service Account Types & Group Managed Service Accounts (gMSA) 2.3 Joining Windows Server to AD DS, Microsoft Entra Domain Services & Microsoft Entra ID 2.4 Creating & Managing Users, Groups and Organizational Units at Scale
4 Chapter 3: Hybrid Identity & Microsoft Entra Integration
3.1 Microsoft Entra Connect Sync Architecture, Installation & Filtering 3.2 SourceAnchor, Synchronization Rules & Microsoft Entra Connect Health 3.3 Microsoft Entra Cloud Sync & Disconnected Multi-Forest Topologies 3.4 Hybrid Authentication Methods & Staged Rollout 3.5 Microsoft Entra Domain Services 3.6 Integrating Microsoft Entra ID, AD DS & Entra Domain Services: Choosing an Architecture
5 Chapter 4: Group Policy in AD DS and Hybrid Environments
4.1 Group Policy Architecture & Processing Order (LSDOU) 4.2 Group Policy Filtering, Loopback Processing & Client-Side Extensions 4.3 Group Policy Preferences, Item-Level Targeting & Central Store 4.4 Group Policy in Microsoft Entra Domain Services & Fine-Grained Password Policies
6 Chapter 5: Remote Server Management in Hybrid Environments
5.1 Windows Admin Center (WAC) Deployment On-Premises and in Azure 5.2 PowerShell Remoting, WinRM & the Kerberos Double-Hop Problem 5.3 Just Enough Administration (JEA) for Constrained PowerShell Endpoints 5.4 OpenSSH on Windows Server & PowerShell Remoting over SSH 5.5 Secure RDP Access, Remote Desktop Gateway & Azure Bastion
7 Chapter 6: Hybrid Management with Azure Arc and Azure Services
6.1 Azure Arc-Enabled Servers Architecture & Onboarding 6.2 Azure Machine Configuration & VM Extensions on Arc Servers 6.3 Azure Update Manager: Assessment, Maintenance Configurations & Dynamic Scoping 6.4 Azure Automation for Hybrid Workloads: Runbooks & Hybrid Runbook Workers
8 Chapter 7: Hyper-V Virtualization & Virtual Machine Configuration
7.1 Hyper-V Type 1 Architecture, Installation & Hardware Prerequisites 7.2 VM Generations, Secure Boot, vTPM, Enhanced Session Mode & Direct VM Access 7.3 Compute, Dynamic Memory & Hardware Acceleration 7.4 VM Resource Controls, CPU Groups & Host Compute Partitioning 7.5 Hyper-V Virtual Hard Disks & Checkpoint Management 7.6 Hyper-V Virtual Switches, NIC Teaming & Switch Embedded Teaming (SET) 7.7 Integration Services, Guest Components & Time Synchronization
9 Chapter 8: Hyper-V High Availability, Security & Containers
8.1 Hyper-V Failover Clustering & Cluster Shared Volumes (CSV) 8.2 Hyper-V Replica & Azure Site Recovery (ASR) 8.3 Guarded Fabric & Shielded Virtual Machines 8.4 Windows Server Container Hosts, Isolation Models & Images 8.5 Managing Container Instances & Linux Containers with WSL 8.6 Windows Container Networking & AKS Enabled by Azure Arc 8.7 Managing Container Images, Tags & Azure Container Registry
10 Chapter 9: Azure IaaS Virtual Machine Administration
9.1 Azure VM Sizing, Series Selection & Managed Disk Tiers 9.2 Azure VM Host Caching, Disk Bursting, Ephemeral OS Disks & Disk Operations 9.3 Azure VM High Availability: Availability Sets, Zones & Proximity Placement Groups 9.4 Virtual Machine Scale Sets, Autoscale & Azure Dedicated Hosts 9.5 Azure VM Networking, NSGs & Connectivity
11 Chapter 10: Hybrid DNS Infrastructure & Name Resolution
10.1 Active Directory-Integrated DNS Architecture, Dynamic Updates & Zone Types 10.2 DNS Records, Aging & Scavenging and the GlobalNames Zone 10.3 DNS Forwarding, Conditional Forwarding & Azure DNS Zone Integration 10.4 Hybrid Name Resolution with Azure DNS Private Resolver 10.5 Windows Server DNS Policies & DNSSEC
12 Chapter 11: IP Addressing, DHCP & IPAM Management
11.1 DHCP Server Role, the DORA Lifecycle & Active Directory Authorization 11.2 DHCP Scopes, Option Hierarchy, Reservations & Relay Agents 11.3 DHCP High Availability & Failover Configurations 11.4 IP Address Management (IPAM) Deployment & Auditing 11.5 Resolving IP Address Issues in Hybrid Environments
13 Chapter 12: Hybrid Network Connectivity, Remote Access & Private Access
12.1 Remote Access Role, VPN Protocols & Site-to-Site VPN to Azure 12.2 Network Policy and Access Services (NPAS), RADIUS & Policy Processing 12.3 Azure Network Adapter & Azure Extended Network 12.4 Web Application Proxy & Microsoft Entra Application Proxy 12.5 Microsoft Entra Private Access & Global Secure Access 12.6 Azure Relay & Hybrid Connections
14 Chapter 13: File Services, DFS, SMB & Azure File Sync
13.1 Windows Server File Share Access, NTFS Permissions & Access-Based Enumeration 13.2 File Server Resource Manager: Quotas, File Screens & Storage Reports 13.3 DFS Namespaces (DFS-N) & DFS Replication (DFS-R) 13.4 BranchCache: Distributed Cache and Hosted Cache Modes 13.5 Modern SMB Protocols, SMB Multichannel & SMB over QUIC 13.6 Azure File Shares, Tiers & Hybrid Permissions 13.7 Azure File Sync, Cloud Tiering & Monitoring 13.8 Migrating DFS Namespaces & DFS Replication to Azure File Sync
15 Chapter 14: Windows Server Storage Infrastructure & High Availability
14.1 Disk Partitioning, Volumes & Enterprise File Systems (NTFS vs ReFS) 14.2 Data Deduplication Architecture, Usage Types & Management 14.3 Storage Spaces & Storage Spaces Direct (S2D) 14.4 Storage Replica & Storage Quality of Service 14.5 iSCSI Target Server, IQNs, CHAP Authentication & Multipath I/O
2.2 Service Account Types & Group Managed Service Accounts (gMSA)
Key Takeaways Explain This Topic AI
Group Managed Service Accounts (gMSAs) eliminate manual password management by delegating 240-byte cryptographically complex password generation and 30-day rotation to the Active Directory Key Distribution Service (KDS).
Before creating a gMSA, a KDS Root Key must be deployed in the forest; in production environments, the root key takes 10 hours to replicate across all domain controllers unless backdated with -EffectiveTime ((Get-Date).AddHours(-10)) in lab environments.
When configuring services, scheduled tasks, or IIS application pools to use a gMSA, the username must include a trailing dollar sign (e.g., CONTOSO\gMSA_AppPool$ ) and the password field must be left blank.
Duplicate Service Principal Names (SPNs) cause Kerberos authentication failures; administrators must use 'setspn -s' to register SPNs with automatic duplicate detection or 'setspn -x' to audit for duplicates forest-wide.
Resource-Based Constrained Delegation (RBCD) decentralizes Kerberos delegation governance by allowing the resource owner to configure msDS-AllowedToActOnBehalfOfOtherIdentity on the backend service, eliminating the requirement for Domain Admin privileges.
Last updated: August 2026
Service Account Types & Group Managed Service Accounts (gMSA)
Running background services, line-of-business applications, scheduled tasks, and Internet Information Services (IIS) worker processes requires identity security principals known as service accounts . Historically, administrators relied on standard domain user accounts with non-expiring passwords, exposing enterprise environments to credential dumping, Kerberoasting, and severe password rotation overhead.
Modern Windows Server hybrid infrastructures leverage Managed Service Accounts (MSAs) —specifically Group Managed Service Accounts (gMSAs) —to automate credential management, enforce Kerberos cryptographic isolation, and support scalable multi-server load-balanced farms.
1. Comparison of Service Account Options
Windows Server environments support four distinct types of service accounts, each tailored to specific workload isolation requirements.
Service Account Type Scope / Boundaries Password Management Multi-Server / Farm Support SPN Management
Standard Domain User Domain-wide Manual (frequently set to never expire; high security risk) Yes (same credentials across nodes) Manual via setspn.exe
Virtual Account Local machine only ( NT SERVICE\<ServiceName> ) Automatic (managed locally by OS, computer account secret) No (single host only) Automatic on host machine account
Standalone MSA (sMSA) Single domain-joined server (introduced in Windows Server 2008 R2) Automatic (managed by AD DS, rotated every 30 days) No (cannot be shared across multiple servers) Automatic on sMSA object
Group MSA (gMSA) Enterprise domain-wide (introduced in Windows Server 2012) Automatic (managed by KDS on Domain Controllers, 240-byte password rotated every 30 days) Yes (supports load-balanced web farms, clusters, and scheduled tasks) Automatic / Configurable via PowerShell
2. gMSA Architecture and Security Mechanics
A Group Managed Service Account (gMSA) is an Active Directory computer-like object class ( msDS-GroupManagedServiceAccount ) whose password lifecycle is governed centrally by domain controllers running the Microsoft Key Distribution Service (KDS) ( kdscli.exe ). +-----------------------------------------------------------------------------------+
- | gMSA ARCHITECTURE & PASSWORD FLOW |
- | |
- | [HOST SERVER: WebServer01] [DOMAIN CONTROLLER / KDS] |
- | - Member of 'SG_WebFarmHosts' - Holds KDS Root Key |
- | - IIS App Pool running as: - Generates 240-byte complex |
- | 'CONTOSO\gMSA_Web$' passwords via KDS algorithm |
- | | | |
- | | 1. MS-SAMR / RPC Password Request | |
- | | (Host proves identity via computer account) | |
- | |------------------------------------------------->| |
- | | | |
- | | 2. DC validates WebServer01 is in | |
- | | 'PrincipalsAllowedToRetrieveManagedPassword' | |
- | | | |
- | | 3. DC returns current managed password | |
- | |<-------------------------------------------------| |
- | | |
- | [HOST SERVER: WebServer01] |
- | - Caches password in LSA secret memory |
- | - Authenticates service seamlessly |
- +-----------------------------------------------------------------------------------+
Core Security Benefits of gMSA:
Cryptographic Complexity: KDS generates a 240-byte random password using combined AES-256 keys derived from the KDS root key and the gMSA object's attributes.
Automatic 30-Day Rotation: Passwords rotate automatically every 30 days ( ManagedPasswordIntervalInDays ). The DC calculates both the current and prior password, ensuring zero service disruption during rotation cycles.
Mitigation of Kerberoasting: Standard domain accounts with weak passwords can be requested by any authenticated user for Kerberos ticket cracking offline. gMSAs utilize 240-byte machine-generated keys that render offline brute-force cracking mathematically infeasible.
Interactive Logon Prevention: gMSAs cannot be used for interactive console or RDP logons, reducing attack surface.
3. Key Distribution Services (KDS) Root Key Requirements
Before creating the first gMSA in an Active Directory forest, the KDS Root Key must be generated in the Active Directory Configuration partition. The KDS root key is used by domain controllers to derive the unique passwords for all gMSAs.
Production Deployment vs. Test/Lab Deployment # PRODUCTION: Create KDS Root Key with standard 10-hour replication wait
- # Domain controllers will not issue gMSA passwords until 10 hours have elapsed
- Add-KdsRootKey -EffectiveTime ((Get-Date).AddHours(10))
- # TEST/LAB ONLY: Backdate the effective time by 10 hours for IMMEDIATE activation
- Add-KdsRootKey -EffectiveTime ((Get-Date).AddHours(-10))
- # Verify active KDS Root Keys in the forest
- Get-KdsRootKey
Important
The 10-Hour Replication Rule: In production environments, domain controllers enforce a default 10-hour delay after root key creation before allowing gMSA password computation. This ensures that all domain controllers across the forest have fully replicated the root key before any client host requests a password. Running New-ADServiceAccount immediately in production without waiting 10 hours (or without backdating in a lab) will result in Test-ADServiceAccount returning $False or throwing error 0x80070005 / Key does not exist .
4. End-to-End gMSA Provisioning Workflow
Deploying a gMSA requires five distinct, sequential operations: # STEP 1: Create an AD Security Group containing all authorized host computers
- New-ADGroup -Name "SG_WebFarmServers" `
- GroupScope Global `
- GroupCategory Security `
- Path "OU=SecurityGroups,DC=contoso,DC=com"
Add-ADGroupMember -Identity "SG_WebFarmServers" -Members "WEB01$", "WEB02$"
- # STEP 2: Create the gMSA object in Active Directory
- New-ADServiceAccount -Name "gMSA_WebFarm" `
- DNSHostName "webfarm.contoso.com" `
- PrincipalsAllowedToRetrieveManagedPassword "SG_WebFarmServers" `
- ServicePrincipalNames "HTTP/webfarm.contoso.com", "HTTP/webfarm" `
- ManagedPasswordIntervalInDays 30 `
- Path "CN=Managed Service Accounts,DC=contoso,DC=com"
- # STEP 3: Install the gMSA on EACH host server (Run locally on WEB01 and WEB02)
- # Requires Remote Server Administration Tools (RSAT) Active Directory module
- Install-ADServiceAccount -Identity "gMSA_WebFarm"
- # STEP 4: Test password retrieval and host authorization (Must return True)
- Test-ADServiceAccount -Identity "gMSA_WebFarm"
- # STEP 5: Configure the application / service to use the gMSA
- # In IIS Application Pool, set Identity to: Custom Account
- # Format: CONTOSO\gMSA_WebFarm$
- # Password fields: Leave completely BLANK
Caution
The Trailing Dollar Sign Requirement: When configuring a Windows Service, IIS Application Pool, or Scheduled Task to run under a gMSA, you MUST append a trailing dollar sign ($) to the account name (e.g., CONTOSO\gMSA_WebFarm$ ) and leave both password fields completely blank. Omitting the $ sign causes Windows to treat the account as a standard user, resulting in logon failure 0xC000006E ( STATUS_ACCOUNT_RESTRICTION ).
5. Service Principal Names (SPNs) & setspn Syntax
A Service Principal Name (SPN) is a unique identifier of a service instance registered in Active Directory, allowing Kerberos mutual authentication between clients and services. If an SPN is missing or duplicated, Kerberos authentication fails and the client falls back to NTLM (or fails entirely if NTLM is blocked).
- SPN Formatting Rules
- Standard format: serviceclass/host:port/servicename or serviceclass/host
- Examples: HTTP/webfarm.contoso.com , MSSQLSvc/sql01.contoso.com:1433
- Core setspn.exe Command Reference :: Register an SPN with duplicate checking (RECOMMENDED)
- setspn -s HTTP/webfarm.contoso.com CONTOSO\gMSA_WebFarm$
- :: List all SPNs registered to an account
- setspn -l CONTOSO\gMSA_WebFarm$
- :: Scan the entire forest for duplicate SPNs (Crucial troubleshooting tool)
- setspn -x
- :: Delete an invalid or obsolete SPN
- setspn -d HTTP/webfarm.contoso.com CONTOSO\OldServiceAcct
- 6. Kerberos Delegation Architectures
When a front-end application (e.g., a web server) needs to impersonate an authenticated user to access a backend resource (e.g., a SQL database), Active Directory provides three Kerberos delegation models: +-----------------------------------------------------------------------------------+
- | KERBEROS DELEGATION COMPARISON |
- | |
- | [1. UNCONSTRAINED DELEGATION (High Risk)] |
- | - Front-end server receives client's full Ticket Granting Ticket (TGT). |
- | - Front-end can impersonate user to ANY service across the ENTIRE forest. |
- | - If front-end is compromised, attacker steals all cached TGTs in LSASS. |
- | |
- | [2. CONSTRAINED DELEGATION (KCD - Service-Configured)] |
- | - Front-end uses S4U2Proxy to request tickets only for SPECIFIC backend SPNs. |
- | - Configured on the FRONT-END account (msDS-AllowedToDelegateTo). |
- | - Requires Domain Admin to configure; cannot cross trust boundaries easily. |
- | |
- | [3. RESOURCE-BASED CONSTRAINED DELEGATION (RBCD - Modern Best Practice)] |
- | - Configured on the BACKEND RESOURCE (msDS-AllowedToActOnBehalfOfOtherIdentity).|
- | - Backend resource owner controls which front-end services can delegate to it. |
- | - Does NOT require Domain Admin privileges; works cleanly across forest trusts. |
- +-----------------------------------------------------------------------------------+
- Configuring Resource-Based Constrained Delegation (RBCD)
RBCD delegates control to the backend service administrator without granting them domain-level privileges: # Allow front-end gMSA (gMSA_WebFarm) to delegate to backend SQL Server (SQL01)
- $FrontEnd = Get-ADServiceAccount -Identity "gMSA_WebFarm"
- Set-ADComputer -Identity "SQL01" -PrincipalsAllowedToDelegateToAccount $FrontEnd
- # Verify delegation configuration on the backend server
- Get-ADComputer -Identity "SQL01" -Properties PrincipalsAllowedToDelegateToAccount