Task 01: Enable WinRM for Remote Management
The automated OS configuration run covers this task in the RemoteManagement step (WinRM running and Automatic with a listener). Use the manual steps below when you can't use the run, or to understand or troubleshoot what it does. See how the run works.
DOCUMENT CATEGORY: Runbook
SCOPE: Remote management enablement
PURPOSE: Bootstrap PowerShell remoting on all cluster nodes so subsequent Phase 03 tasks can run remotely from the management server
MASTER REFERENCE: Phase 03: OS Configuration
Status: Active
Overview
Enable WinRM on each Azure Local node. This task must run directly on each node via iDRAC Virtual Console — WinRM cannot be enabled remotely because it does not exist yet on a fresh OS installation.
Once complete on all nodes, all subsequent Phase 03 tasks can be executed remotely from the management server.
Prerequisites
| Requirement | Description | Source |
|---|---|---|
| Phase 02 Complete | Azure Stack HCI OS installed and verified on all nodes | Phase 02 |
| iDRAC console access | Virtual Console accessible for each node | infrastructure.yml: nodes[].bmc.ip_address |
| Administrator credentials | Local admin password set during OS installation | infrastructure.yml: identity.local_admin.password (a secret reference) |
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.
TrustedHosts Configuration
TrustedHosts controls which remote computers are allowed to connect to the node via WinRM. Before running the script, identify all networks from which you will be managing these nodes and combine them into a comma-separated value.
The commands on this page use 192.0.2.*, a documentation range. You must change it to match your environment before running. An incorrect or missing TrustedHosts entry will prevent remote management from working and is a common source of "Access denied" failures.
Networks to Include
| Network | Source | Example |
|---|---|---|
| Management server subnet | infrastructure.yml: networking.management.subnet | 192.0.2.* |
| Point-to-site VPN client pool | infrastructure.yml: landing_zone.connectivity.vpn_gateway.point_to_site.address_pool | 203.0.113.0/24 |
| Delivery engineer working network | Laptop/jumpbox subnet during the engagement | 198.51.100.* |
Include all networks from which you or the management server will connect to the nodes. If you are working from a P2S VPN connection, your VPN-assigned address will come from the point-to-site address pool — this must be in TrustedHosts or your remote sessions will be rejected.
Combining Multiple Networks
TrustedHosts accepts a comma-separated list of hostnames, IP addresses, or wildcards:
# Example combining management subnet, P2S VPN pool, and delivery engineer network
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.0.2.*,203.0.113.*,198.51.100.*" -Force
To append to an existing TrustedHosts list without overwriting:
$current = (Get-Item WSMan:\localhost\Client\TrustedHosts).Value
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "$current,203.0.113.*" -Force
Using a wildcard per subnet (e.g., 192.0.2.*) is more practical than listing individual IPs and covers the entire subnet for the duration of the engagement.
Execution
- Direct Script (On Node)
- Orchestrated Script
Run on each node via iDRAC Virtual Console. Repeat for every node before proceeding.
- Open
https://<idrac-ip>→ Virtual Console → Launch - Log in as
Administrator - Update the
TrustedHostsvalue to match your environment (see TrustedHosts Configuration above) - Run the following:
# Enable WinRM
winrm quickconfig -q
# Set network profile to Private (required for WinRM)
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
# Enable WinRM firewall rules
Enable-NetFirewallRule -DisplayGroup "Windows Remote Management"
# Configure TrustedHosts — update to include all networks you will manage from
# Include: management subnet, P2S VPN client pool, delivery engineer working network
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.0.2.*,203.0.113.*" -Force
# Verify
Get-Service WinRM | Select-Object Name, Status, StartType
Test-WSMan -ComputerName localhost
PowerShell
No script in this task folder. The folder
scripts/deploy/04-cluster-deployment/phase-03-os-configuration/task-01-enable-winrm-for-remote-managementholds only a placeholder. A placeholder printsNOT IMPLEMENTED, changes nothing and exits with code 3. The earlierEnable-WinRmConfiguration.ps1is removed. The OS configuration does this task in its RemoteManagement step.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-03-os-configuration/Invoke-AzureLocalOsConfiguration.ps1 | The one entry point of the OS configuration. It runs Set-AzureLocalNodeConfiguration.ps1 for each node: it reads the node, changes only what differs from infrastructure.yml, and reports. -Step limits the run to one step. |
A node that does not answer over WinRM yet is reached once through the bootstrap that os_configuration.remoting.bootstrap_transport names.
The nodes' local administrator comes from identity.local_admin of infrastructure.yml (the password is a secret reference), or from -Credential. The script never prompts. Run settings go in a JSON file given with -SettingsFile.
Run
# Plan (the default): read every node and list what would change
./Invoke-AzureLocalOsConfiguration.ps1 -InfrastructureFile ./infrastructure.yml -Step RemoteManagement
# Apply
./Invoke-AzureLocalOsConfiguration.ps1 -InfrastructureFile ./infrastructure.yml -Step RemoteManagement -Mode Apply
See how the run works.
Validation Checklist
- TrustedHosts updated to include all required networks before running
- Script completed on all nodes via iDRAC Virtual Console
- WinRM service
RunningandStartType: Automaticon all nodes -
Test-WSMan -ComputerName localhostreturns schema version without error on all nodes - PSRemoting session can be established from management server to each node
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
winrm quickconfig fails | WinRM service disabled | Start-Service WinRM; Set-Service WinRM -StartupType Automatic |
Test-WSMan fails locally | Network profile still Public | Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private |
| Management server cannot connect | TrustedHosts not set on management server | Run Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.0.2.*" -Force on the management server |
| P2S VPN session rejected | P2S client pool not in TrustedHosts | Add the point-to-site address pool to TrustedHosts on each node |
| "Access denied" from management server | Wrong credentials | Verify local Administrator password from Key Vault |
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.
Navigation
| ← Phase 03 Overview | ↑ Phase 03: OS Configuration | Task 02: Enable RDP → |
Version Control
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | 2026-01-31 | Azure Local Cloud | Initial document |
| 1.1 | 2026-03-04 | Azure Local Cloud | Remove tabs, flat prose version |
| 1.2 | 2026-03-04 | Azure Local Cloud | Incorrect orchestrated tab removed |
| 1.3 | 2026-03-04 | Azure Local Cloud | Direct (On Node) + Standalone tabs |
| 1.4 | 2026-03-04 | Azure Local Cloud | Incorrectly replaced with single orchestrated tab |
| 1.5 | 2026-03-04 | Azure Local Cloud | Single Direct Script (On Node) tab with correct bootstrap script |
| 1.6 | 2026-03-04 | Azure Local Cloud | Add TrustedHosts Configuration section covering management subnet, P2S VPN pool, and delivery engineer network |