Study guide
5.2 PowerShell Remoting, WinRM & the Kerberos Double-Hop Problem
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
5.2 PowerShell Remoting, WinRM & the Kerberos Double-Hop Problem
Key Takeaways Explain This Topic AI
PowerShell Remoting runs over WinRM implementing WS-Management on TCP 5985 for HTTP and TCP 5986 for HTTPS; the payload is always encrypted at the protocol layer even on 5985.
Enter-PSSession opens an interactive 1:1 session for troubleshooting, while Invoke-Command fans out to many machines in parallel and is the correct tool for fleet-wide scripts.
Invoke-Command throttles to 32 concurrent connections by default; -ThrottleLimit raises that ceiling when running against hundreds of servers.
The Kerberos double-hop failure occurs because the first remote server receives a service ticket, not the user's credentials, so it cannot authenticate onward to a second server.
Resource-Based Constrained Delegation is the preferred double-hop fix because the trust is configured on the target resource and no plaintext credential is cached, unlike CredSSP.
Last updated: August 2026
PowerShell Remoting, WinRM & the Kerberos Double-Hop Problem
PowerShell Remoting is the bedrock of modern Windows Server systems management and automation. It allows systems administrators to execute commands, automate deployments, query inventory, and manage state across thousands of on-premises physical nodes, hypervisors, and cloud virtual machines simultaneously.
This section covers the transport itself: the WS-Management and WinRM protocols, interactive versus fan-out remoting, and the notorious Kerberos Double-Hop authentication problem together with its secure mitigations. The two least-privilege and cross-platform layers that build on this transport have their own sections — Just Enough Administration (JEA) in section 5.3, and OpenSSH with PowerShell remoting over SSH in section 5.4.
1. PowerShell Remoting Architecture: WinRM & WS-Management
PowerShell Remoting relies on the Windows Remote Management (WinRM) service, Microsoft's implementation of the industry-standard WS-Management (WS-Man) protocol—a SOAP-based, firewall-friendly protocol running over standard HTTP and HTTPS transports. +-----------------------------------------------------------------------------------------+
- | POWERSHELL REMOTING TRANSPORT ARCHITECTURE |
- | |
- | [Admin Workstation] [Target Windows Server] |
- | +---------------------+ +-------------------------+ |
- | | PowerShell Console | | WinRM Listener | |
- | | Enter-PSSession / | | - Port 5985 (HTTP) | |
- | | Invoke-Command | | - Port 5986 (HTTPS) | |
- | +---------------------+ +-------------------------+ |
- | | | |
- | |========== WS-Management / SOAP XML Encapsulated ==========| |
- | | (Payload Encrypted via Kerberos/SPNEGO) | |
- | v v |
- | +---------------------+ +-------------------------+ |
- | | Windows Defender | | WsmSvc (WinRM Service) | |
- | | Firewall Outbound | ===== (TCP 5985 / 5986 Across LAN) =====> | - Spawns wsmprovhost.exe| |
- | +---------------------+ | - Executes in Runspace | |
- | +-------------------------+ |
- +-----------------------------------------------------------------------------------------+
Listener Ports and Default Cryptographic Protections:
TCP Port 5985 (HTTP Listener): The default port for standard PowerShell Remoting. Although the URI prefix uses http:// , in an Active Directory domain environment, the entire payload is encrypted at the application layer using SPNEGO/Kerberos cryptographic session keys (AES-256). No plaintext passwords or commands cross the wire.
TCP Port 5986 (HTTPS Listener): The secure transport port requiring an SSL/TLS certificate bound to the WinRM listener. Mandatory when authenticating across non-domain boundaries or untrusted perimeter networks where Kerberos mutual authentication is unavailable.
Enabling and Configuring WinRM:
Executing Enable-PSRemoting -Force performs all necessary configuration steps:
Starts and sets the WinRM ( wsmsvc ) service startup type to Automatic .
Creates a WinRM listener on 0.0.0.0 (IPv4) and :: (IPv6) on port 5985.
Enables the Windows Defender Firewall inbound rule group: Windows Remote Management (HTTP-In) .
Configures the default session configurations ( microsoft.powershell , microsoft.powershell32 , microsoft.powershell.workflow ). # Initialize Remoting and configure maximum envelope size
Enable-PSRemoting -Force -SkipNetworkProfileCheck
# Configure WinRM Listener for HTTPS on Port 5986 with a CA-issued certificate
$cert = Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object { $_.Subject -like '*server01*' } | Select-Object -First 1
New-Item -Path WSMan:\localhost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $cert.Thumbprint -Force
- # Open Inbound Port 5986 in Windows Defender Firewall
- New-NetFirewallRule -Name "WinRM-HTTPS-In" -DisplayName "Windows Remote Management (HTTPS-In)" `
- Profile Any -LocalPort 5986 -Protocol TCP -Direction Inbound -Action Allow
Cross-Domain and Workgroup Remoting (TrustedHosts Configuration):
When connecting to a server in an untrusted domain or a workgroup, Kerberos mutual authentication cannot take place. The client refuses connection unless HTTPS is used or the target is added to the client's WSMan:\localhost\Client\TrustedHosts list. # Add specific target servers or IP subnets to TrustedHosts on the client
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value "192.168.10.*,web01.contoso.local" -Concatenate -Force
Warning
Security Implications of TrustedHosts * : Setting TrustedHosts to * forces the client to bypass target server identity verification. This exposes credentials to man-in-the-middle (MITM) impersonation attacks if NTLM authentication is negotiated over unencrypted HTTP (Port 5985). Always prefer WinRM HTTPS (Port 5986) with explicit certificate validation for cross-domain and perimeter nodes.
2. Interactive (1:1) vs Fan-Out (1:Many) Remoting
PowerShell provides two primary execution paradigms: interactive single-system troubleshooting and scalable distributed fan-out automation. +-----------------------------------------------------------------------------------------+
- | 1:1 INTERACTIVE VS 1:MANY FAN-OUT REMOTING |
- | |
- | [1:1 INTERACTIVE - Enter-PSSession] [1:MANY FAN-OUT - Invoke-Command] |
- | +---------------------------------+ +------------------------------------+ |
- | | Admin Workstation | | Admin Workstation | |
- | | Enter-PSSession -Computer Srv1 | | Invoke-Command -Computer Srv1..100| |
- | +---------------------------------+ +------------------------------------+ |
- | | / | \ |
- | v (Single Pipe) v v v |
- | +---------------+ +------+ +------+ +------+ |
- | | Server 1 | | Srv1 | | Srv2 | |Srv100| |
- | | Interactive | +------+ +------+ +------+ |
- | | Session Prompt| (Executes Scriptblock concurrently |
- | +---------------+ in parallel; throttle limit: 32) |
- +-----------------------------------------------------------------------------------------+
- Comparing Remoting Cmdlets
- Feature Enter-PSSession Invoke-Command New-PSSession
- Execution Model 1:1 Interactive Console 1:Many Parallel Distributed Persistent Session Object Creation
Target Capacity Single server per console Up to hundreds concurrently ( -ThrottleLimit ) Manages pooled connection states
Data Format Live interactive text stream Serialized XML / Deserialized Objects (CliXml) Reusable runspace connection object
Primary Use Case Ad-hoc debugging, real-time exploration Fleet automation, bulk patching, reporting Multi-stage orchestration workflows
Background Execution Not Supported Supported via -AsJob parameter Maintained in memory until disconnected
Advanced Distributed Execution Syntax # Mass inventory query across 50 servers in parallel with custom throttling
- $ServerList = Get-Content -Path 'C:\Inventory\servers.txt'
- $DiskReport = Invoke-Command -ComputerName $ServerList -ThrottleLimit 50 -ScriptBlock {
- Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DriveType=3" |
- Select-Object SystemName, DeviceID, `
- @{Name="SizeGB"; Expression={[math]::Round($_.Size / 1GB, 2)}}, `
- @{Name="FreeGB"; Expression={[math]::Round($_.FreeSpace / 1GB, 2)}}
- }
- # Disconnected session orchestration across maintenance cycles
- $Session = New-PSSession -ComputerName 'SQL-PROD-01' -Name 'MaintenanceRun'
- Invoke-Command -Session $Session -ScriptBlock { Start-ServiceMaintenanceTask } -InDisconnectedSession
# ... (Hours later, reconnect from any admin workstation) ...
- $ReconnectedSession = Connect-PSSession -ComputerName 'SQL-PROD-01' -Name 'MaintenanceRun'
- Receive-PSSession -Session $ReconnectedSession
- 3. The Kerberos Double-Hop Problem & Secure Mitigations
When an administrator establishes a remote PowerShell session to Server A (Hop 1) and then attempts to execute a command from Server A that reaches out to Server B or a network share (Hop 2), the second operation fails with an Access Denied error. This is the classic Kerberos Double-Hop (Second-Hop) Problem .
Double-Hop Resolution Strategies Comparison
Mitigation Method Security Posture Configuration Complexity Operational Mechanism & Best Practice
Kerberos Constrained Delegation (KCD / RBCD) High (Recommended) Moderate Configured on AD computer objects ( msDS-AllowedToDelegateTo or msDS-AllowedToActOnBehalfOfOtherIdentity ). Limits Server A to specific SPNs on Server B.
Just Enough Administration (JEA) Virtual Accounts Highest (Zero Trust) High (Config Files) Runs Hop 1 under a local, temporary privileged virtual account with no domain credentials exposed. Eliminates the need for hop delegation.
Passing Explicit PSCredential in Script Moderate Low Script creates a [PSCredential] object and passes it explicitly to the Hop 2 cmdlet (e.g., Get-ChildItem -Credential $cred ). Credential remains localized.
Credential Security Support Provider (CredSSP) Low (Exam Danger) Very Low Server A caches the client's plaintext credentials in lsass.exe memory to replay to Server B. High vulnerability to Pass-the-Hash and Mimikatz attacks.
Why the Double-Hop Occurs:
During standard Kerberos authentication in Hop 1, the client sends a Kerberos service ticket to Server A. Server A validates the ticket and creates an impersonation token for the user. However, by default design in Active Directory Kerberos security, Server A does not possess the user's password or TGT key . Consequently, Server A cannot generate a new Kerberos service ticket to present to Server B. The second-hop connection is downgraded to NT AUTHORITY\ANONYMOUS LOGON , causing immediate access denial.
Configuring Resource-Based Constrained Delegation (RBCD) via PowerShell: # Allow Server A (Hop 1) to delegate Kerberos credentials to Server B (Target File Server / Hop 2)
- $ServerA = Get-ADComputer -Identity "SRV-MGMT-01"
- Set-ADComputer -Identity "SRV-FILE-02" -PrincipalsAllowedToDelegateToAccount $ServerA
Caution
The CredSSP Exam Trap: While running Enable-WSManCredSSP -Role Server and Enable-WSManCredSSP -Role Client technically solves the multi-hop problem, CredSSP is strictly discouraged by Microsoft in production enterprise environments . CredSSP sends plaintext user credentials to the intermediate server and stores them in memory, allowing a local administrator on Server A to steal domain credentials. On the AZ-800 exam, choose Kerberos Constrained Delegation (KCD) , Resource-Based Constrained Delegation (RBCD) , or JEA , not CredSSP.
Loading diagram... The Kerberos Double-Hop Problem Mechanics vs Secure Delegations
Double-Hop Resolution Strategies Comparison
Mitigation Method Security Posture Configuration Complexity Operational Mechanism & Best Practice
Kerberos Constrained Delegation (KCD / RBCD) High (Recommended) Moderate Configured on AD computer objects ( msDS-AllowedToDelegateTo or msDS-AllowedToActOnBehalfOfOtherIdentity ). Limits Server A to specific SPNs on Server B.
Just Enough Administration (JEA) Virtual Accounts Highest (Zero Trust) High (Config Files) Runs Hop 1 under a local, temporary privileged virtual account with no domain credentials exposed. Eliminates the need for hop delegation.
Passing Explicit PSCredential in Script Moderate Low Script creates a [PSCredential] object and passes it explicitly to the Hop 2 cmdlet (e.g., Get-ChildItem -Credential $cred ). Credential remains localized.
Credential Security Support Provider (CredSSP) Low (Exam Danger) Very Low Server A caches the client's plaintext credentials in lsass.exe memory to replay to Server B. High vulnerability to Pass-the-Hash and Mimikatz attacks.