Study guide

6.2 Azure Machine Configuration & VM Extensions on Arc Servers

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

6.2 Azure Machine Configuration & VM Extensions on Arc Servers

Key Takeaways Explain This Topic AI

Azure Machine Configuration (formerly Azure Policy Guest Configuration) evaluates and remediates in-guest operating system settings on Arc servers using PowerShell Desired State Configuration (DSC v3).

Custom Machine Configuration packages consist of a .zip file containing a compiled DSC configuration (localhost.mof), package metadata (metadata.json), and required DSC resource modules, authored via the GuestConfiguration PowerShell module.

Azure Policy enforces governance using 'AuditIfNotExists' to detect configuration drift and 'DeployIfNotExists' combined with managed identities to automatically remediate in-guest compliance failures.

VM Extensions for Arc servers enable key Azure management capabilities, including Azure Monitor Agent (AMA) with Data Collection Rules (DCRs), Microsoft Defender for Endpoint (MDE), Azure Key Vault automatic certificate sync, and Custom Script Extension.

The Azure Arc Run Command feature executes ad-hoc PowerShell or Bash scripts on managed hybrid servers via the Azure Portal or CLI over outbound HTTPS channels, eliminating the need to expose inbound RDP (3389) or WinRM (5985/5986) ports.

Last updated: August 2026

Azure Machine Configuration & VM Extensions on Arc Servers

Projecting physical and virtual servers into Azure Resource Manager via Azure Arc is only the foundational step. Realizing true hybrid governance requires the ability to audit operating system configurations, enforce standardized security baselines, install management tooling, and execute remote administrative tasks without depending on legacy on-premises management infrastructure.

Azure Arc fulfills these operational requirements through two powerful capabilities:

Azure Machine Configuration (formerly Azure Policy Guest Configuration): A declarative, policy-driven engine that audits and enforces in-guest OS settings using PowerShell Desired State Configuration (DSC v3).

Azure VM Extensions & Run Command : A modular software extension framework that brings native Azure agent features—such as Azure Monitor Agent, Microsoft Defender for Servers, Key Vault certificate enrollment, and ad-hoc script execution—directly to hybrid servers.

1. Azure Machine Configuration Architecture & DSC v3

Azure Machine Configuration enables auditing and configuring in-guest operating system settings for both Azure virtual machines and Azure Arc-enabled servers natively through Azure Policy . +-----------------------------------------------------------------------------------------+

  • | AZURE MACHINE CONFIGURATION EXECUTION PIPELINE |
  • | |
  • | [AZURE POLICY CONTROL PLANE] |
  • | - Azure Policy Definition (AuditIfNotExists / DeployIfNotExists) |
  • | - Policy Assignment (Target: Subscription, RG, or Arc Machine) |
  • | - Points to: Package URI (HTTPS Blob Storage with SAS token) |
  • | | |
  • | | (Policy Assignment Pushed via ARM) |
  • | v |
  • | [GUEST CONFIGURATION SERVICE (gc_service)] |
  • | 1. Downloads Package .zip (localhost.mof + metadata.json + DSC Modules) |
  • | 2. Validates package hash against Azure Policy assignment |
  • | 3. Sandboxed PowerShell DSC v3 Engine executes: |
  • | * Test-TargetResource (Evaluates compliance) |
  • | * Set-TargetResource (Applies remediation if DeployIfNotExists/AuditandSet) |
  • | 4. Reports structured compliance JSON back to Azure Policy Engine |
  • +-----------------------------------------------------------------------------------------+

How the Machine Configuration Engine Operates:

The Guest Configuration Service ( gc_service ) running on the Arc-enabled server periodically queries Azure Policy for assigned configuration definitions.

When a policy is assigned, gc_service downloads the packaged configuration .zip archive from Azure Blob Storage over outbound HTTPS (TCP 443).

Inside the guest OS, gc_service executes an isolated, embedded instance of PowerShell Desired State Configuration (DSC v3) . It invokes Test-TargetResource (or the DSC class Test() method) to verify whether the local OS state matches the declared baseline.

If the policy effect is configured for remediation, the agent executes Set-TargetResource to bring non-compliant settings into desired alignment.

The resulting compliance data is posted back to Azure Policy, providing centralized compliance dashboards across on-premises and cloud servers.

2. Built-in Baselines vs Authoring Custom Configuration Packages

Microsoft provides extensive built-in Machine Configuration definitions that can be assigned directly from the Azure Portal, including:

Windows Server Security Baselines (aligned with CIS and Microsoft Security Baselines).

Auditing password complexity, lockout thresholds, and maximum password age.

Enforcing TLS 1.2 / TLS 1.3 protocol and cipher suite configurations.

Auditing non-standard accounts in the local BUILTIN\Administrators group.

Auditing BitLocker drive encryption and Windows Defender Antivirus real-time protection.

Authoring Custom Machine Configuration Packages

When an enterprise requires custom configuration baselines (e.g., verifying specific internal registry keys, auditing customized audit policies, or checking legacy file permissions), administrators author custom packages using the GuestConfiguration PowerShell module. +-----------------------------------------------------------------------------------------+

  • | CUSTOM MACHINE CONFIGURATION PACKAGE STRUCTURE (.ZIP) |
  • | |
  • | CustomPackage.zip |
  • | ├── localhost.mof <-- Compiled MOF document containing target settings |
  • | ├── metadata.json <-- Package version, hash, OS requirements, parameters |
  • | └── Modules/ |
  • | └── PSDscResources/ <-- Required PowerShell DSC modules & resource providers|
  • | └── 2.12.0.0/ |
  • | ├── PSDscResources.psd1 |
  • | └── ... |
  • +-----------------------------------------------------------------------------------------+
  • Step-by-Step Custom Package Creation Workflow: # Step 1: Install the GuestConfiguration authoring module
  • Install-Module -Name GuestConfiguration -Scope CurrentUser -Repository PSGallery
  • # Step 2: Define and compile the DSC Configuration into a MOF file
  • Configuration AuditSecuritySettings {
  • Import-DscResource -ModuleName PSDscResources
  • Registry DisableInsecureSMB1 {
  • Key = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters'
  • ValueName = 'SMB1'
  • ValueData = '0'
  • ValueType = 'Dword'
  • Ensure = 'Present'
  • }
  • }
  • # Compile the configuration
  • AuditSecuritySettings -OutputPath "C:\MachineConfig\MOF"
  • # Step 3: Package the MOF, metadata, and dependencies into a signed .zip artifact
  • New-GuestConfigurationPackage `
  • Name "AuditSecuritySettings" `
  • Configuration "C:\MachineConfig\MOF\AuditSecuritySettings\localhost.mof" `
  • Type "Audit" `
  • Path "C:\MachineConfig\Packages\AuditSecuritySettings.zip" `
  • Force
  • # Step 4: Test package compliance locally prior to deployment
  • Get-GuestConfigurationPackageComplianceStatus -Path "C:\MachineConfig\Packages\AuditSecuritySettings.zip"
  • # Step 5: Publish package to an Azure Storage Blob container
  • Publish-GuestConfigurationPackage `
  • Path "C:\MachineConfig\Packages\AuditSecuritySettings.zip" `
  • ResourceGroupName "rg-hybrid-governance" `
  • StorageAccountName "stgarcconfiguration" `
  • StorageContainerName "guestconfiguration"
  • 3. Azure Policy Effects: AuditIfNotExists vs DeployIfNotExists

Machine Configuration policies utilize specific Azure Policy effects to govern enforcement behavior: +-----------------------------------------------------------------------------------------+

  • | POLICY EFFECTS COMPARISON IN MACHINE CONFIGURATION |
  • | |
  • | DIMENSION AuditIfNotExists DeployIfNotExists |
  • | --------------------+------------------------------+----------------------------------|
  • | Primary Purpose | Passive compliance auditing | Active configuration remediation |
  • | Package Type | 'Audit' | 'AuditandSet' |
  • | In-Guest Action | Executes Test-TargetResource | Executes Test-TargetResource & |
  • | | (Reports Pass/Fail) | Set-TargetResource |
  • | OS State Change | Zero modifications to OS | Modifies OS registry/files/state |
  • | Identity Required | Standard ARM Read access | System/User Managed Identity |
  • | | | with 'Guest Configuration |
  • | | | Contributor' role |
  • +-----------------------------------------------------------------------------------------+

AuditIfNotExists : Evaluates whether a Microsoft.GuestConfiguration/guestConfigurationAssignments resource exists on the Arc server and whether its compliance state is Compliant . If the configuration deviates from the baseline, Azure Policy marks the machine as Non-Compliant in compliance dashboards. It will never alter files, services, or registry values on the server.

DeployIfNotExists : Automatically creates and links the guestConfigurationAssignments sub-resource to the Arc server. When configured with an AuditandSet package, if the agent detects configuration drift during periodic evaluation, it automatically executes the DSC Set-TargetResource method to correct the deviation. Remediating non-compliant resources requires creating a Remediation Task in Azure Policy backed by a Managed Identity with appropriate RBAC privileges.

4. Core VM Extensions on Azure Arc-Enabled Servers

VM Extensions are small applications that execute post-onboarding configuration and management automation tasks on Azure Arc-enabled servers. The Extension Manager ( extmd ) handles extension lifecycle operations. +-----------------------------------------------------------------------------------------+

  • | CORE VM EXTENSIONS FOR ARC-ENABLED SERVERS |
  • | |
  • | +---------------------------+ +---------------------------+ +----------------------+ |
  • | | Azure Monitor Agent (AMA) | | Defender for Servers(MDE) | | Key Vault Extension | |
  • | | - Data Collection Rules | | - MDE Sensor Onboarding | | - Auto Cert Enroller | |
  • | | - Perf Counters & Events | | - Vulnerability Scan (MDVM| | - Local Cert Store Sync| |
  • | | - Replaces MMA / OMS | | - EDR & Behavioral Alert | | - Zero Manual Renewal| |
  • | +---------------------------+ +---------------------------+ +----------------------+ |
  • | | |
  • | +------------------------------------------------------------------------------------+ |
  • | | Custom Script Extension | |
  • | | - Downloads & executes PowerShell scripts from Azure Blob / GitHub | |
  • | | - Automates application setup, agent distribution, and post-join config | |
  • | +------------------------------------------------------------------------------------+ |
  • +-----------------------------------------------------------------------------------------+
  • 1. Azure Monitor Agent (AMA)

Architecture: The modern, unified telemetry agent for Windows and Linux that completely supersedes the legacy Log Analytics (MMA / OMS) agent and Diagnostics extension.

Data Collection Rules (DCRs): Unlike the legacy MMA agent which sent identical data to an entire workspace, AMA utilizes Data Collection Rules (DCRs) . DCRs allow filtering and scoping at the source: administrators specify exactly which Windows Event Logs (System, Application, Security via XPath queries), performance counters (CPU, Memory, Disk IOPS), and IIS logs are collected from specific subsets of Arc servers, streaming them to Log Analytics or Azure Monitor Metrics.

2. Microsoft Defender for Servers / MDE Extension

Deploys the Microsoft Defender for Endpoint (MDE) sensor to Arc-enabled servers seamlessly without running local installation packages or onboarding scripts.

Provides real-time behavioral protection, cloud-delivered malware protection, Endpoint Detection and Response (EDR), and continuous vulnerability assessment through Microsoft Defender Vulnerability Management (MDVM).

3. Azure Key Vault VM Extension

Automatically enrolls, downloads, and periodically polls Azure Key Vault for updated X.509 SSL/TLS certificates and installs them directly into the local Windows Certificate Store ( Cert:\LocalMachine\My ).

Eliminates manual certificate renewal processes across on-premises web servers (IIS) and application hosts by monitoring certificate validity and automatically downloading new versions when rotated in Key Vault.

4. Custom Script Extension for Windows

Allows downloading and executing arbitrary PowerShell scripts located in Azure Blob Storage, GitHub repositories, or internal web servers.

Common use cases include executing silent application installations, provisioning local service accounts, or running post-onboarding bootstrapping tasks.

Deploying VM Extensions via Azure CLI # Deploy the Azure Monitor Agent (AMA) extension to an Arc-enabled server

  • az connectedmachine extension create \
  • -resource-group "rg-hybrid-infrastructure" \
  • -machine-name "SRV-APP-01" \
  • -name "AzureMonitorWindowsAgent" \
  • -type "AzureMonitorWindowsAgent" \
  • -publisher "Microsoft.Azure.Monitor" \
  • -location "eastus"
  • # Deploy the Azure Key Vault extension for automated certificate sync
  • az connectedmachine extension create \
  • -resource-group "rg-hybrid-infrastructure" \
  • -machine-name "SRV-WEB-01" \
  • -name "KeyVaultForWindows" \
  • -type "KeyVaultForWindows" \
  • -publisher "Microsoft.Azure.KeyVault" \

--settings '{"secretsManagementSettings": {"pollingIntervalInS": "3600", "certificateStoreName": "MY", "certificateStoreLocation": "LocalMachine", "observedCertificates": ["https://kv-corp-prod.vault.azure.net/secrets/web-ssl-cert"]}}'

5. Azure Arc Run Command vs Custom Script Extension

For remote script execution, Azure Arc provides two distinct capabilities: Azure Arc Run Command and Custom Script Extension . +-----------------------------------------------------------------------------------------+

  • | RUN COMMAND VS CUSTOM SCRIPT EXTENSION COMPARISON |
  • | |
  • | DIMENSION AZURE ARC RUN COMMAND CUSTOM SCRIPT EXTENSION |
  • | --------------------+------------------------------+----------------------------------|
  • | Primary Objective | Ad-hoc troubleshooting and | Initial server provisioning and |
  • | | diagnostic script execution | multi-step software installation |
  • | Execution Model | Immediate, interactive, or | Asynchronous extension deployment|
  • | | asynchronous via CLI/Portal | lifecycle driven by ARM template |
  • | Script Source | Inline script text or remote | External files stored in Azure |
  • | | script URI | Blob Storage or public URLs |
  • | Re-execution Model | Repeatable on demand with | Requires updating sequence number|
  • | | different parameters | or modifying extension config |
  • | Network Exposure | Zero inbound ports (HTTPS) | Zero inbound ports (HTTPS) |
  • +-----------------------------------------------------------------------------------------+
  • Executing Ad-Hoc Scripts with Run Command

The Run Command feature leverages the Connected Machine Agent infrastructure to execute PowerShell scripts on Windows (or Bash scripts on Linux) without establishing an RDP, SSH, or WinRM session, and without exposing port 3389 or 5985/5986. # Execute an ad-hoc PowerShell command on an Arc server and stream stdout

  • az connectedmachine run-command create \
  • -resource-group "rg-hybrid-infrastructure" \
  • -machine-name "SRV-DB-01" \
  • -run-command-name "CheckDiskSpace" \

--script "Get-Volume -DriveLetter C, D | Select-Object DriveLetter, FileSystemLabel, SizeRemaining, Size | Format-Table -AutoSize"

Tip

Security Isolation with Run Command: Run Command operations execute under the local NT AUTHORITY\SYSTEM account on Windows. Access to trigger Run Commands is controlled strictly via Azure RBAC ( Microsoft.HybridCompute/machines/runCommands/write permission). This enables central cloud administrators or automated pipelines to perform break-glass diagnostics on on-premises servers without requiring local administrative domain credentials.

Loading diagram... Azure Machine Configuration & VM Extensions Architecture