Skip to main content

Task 01: Enable WinRM for Remote Management

The automated run does this task for you

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.

Runbook Azure Dell

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​

RequirementDescriptionSource
Phase 02 CompleteAzure Stack HCI OS installed and verified on all nodesPhase 02
iDRAC console accessVirtual Console accessible for each nodeinfrastructure.yml: nodes[].bmc.ip_address
Administrator credentialsLocal admin password set during OS installationinfrastructure.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.

Update TrustedHosts Before Running

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​

NetworkSourceExample
Management server subnetinfrastructure.yml: networking.management.subnet192.0.2.*
Point-to-site VPN client poolinfrastructure.yml: landing_zone.connectivity.vpn_gateway.point_to_site.address_pool203.0.113.0/24
Delivery engineer working networkLaptop/jumpbox subnet during the engagement198.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
Use a Subnet Wildcard

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​

Run on each node via iDRAC Virtual Console. Repeat for every node before proceeding.

  1. Open https://<idrac-ip> → Virtual Console → Launch
  2. Log in as Administrator
  3. Update the TrustedHosts value to match your environment (see TrustedHosts Configuration above)
  4. 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

Validation Checklist​

  • TrustedHosts updated to include all required networks before running
  • Script completed on all nodes via iDRAC Virtual Console
  • WinRM service Running and StartType: Automatic on all nodes
  • Test-WSMan -ComputerName localhost returns schema version without error on all nodes
  • PSRemoting session can be established from management server to each node

Troubleshooting​

IssueCauseResolution
winrm quickconfig failsWinRM service disabledStart-Service WinRM; Set-Service WinRM -StartupType Automatic
Test-WSMan fails locallyNetwork profile still PublicGet-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
Management server cannot connectTrustedHosts not set on management serverRun Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.0.2.*" -Force on the management server
P2S VPN session rejectedP2S client pool not in TrustedHostsAdd the point-to-site address pool to TrustedHosts on each node
"Access denied" from management serverWrong credentialsVerify 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.

← Phase 03 Overview↑ Phase 03: OS ConfigurationTask 02: Enable RDP →

Version Control​

VersionDateAuthorChanges
1.02026-01-31Azure Local CloudInitial document
1.12026-03-04Azure Local CloudRemove tabs, flat prose version
1.22026-03-04Azure Local CloudIncorrect orchestrated tab removed
1.32026-03-04Azure Local CloudDirect (On Node) + Standalone tabs
1.42026-03-04Azure Local CloudIncorrectly replaced with single orchestrated tab
1.52026-03-04Azure Local CloudSingle Direct Script (On Node) tab with correct bootstrap script
1.62026-03-04Azure Local CloudAdd TrustedHosts Configuration section covering management subnet, P2S VPN pool, and delivery engineer network