WinRM
Cheat sheet · https://pcornel.dk/topic.php?topic=5666
Answer
WinRM in Windows Automation provides WS-Management transport for remote management, with listener, certificate/trust, authentication, authorization and endpoint/session configuration as separate proof boundaries.
Remember
- TCP 5985/5986 reachable ≠ WinRM listener usable.
- HTTPS listener exists ≠ certificate identity trusted.
- WinRM authentication ≠ PowerShell endpoint authorization.
- Test-WSMan success ≠ requested remote command succeeds.
First checks
winrm quickconfig— basic setupwinrm enumerate winrm/config/listener— listenersTest-NetConnection <host> -Port 5986— HTTPS listener
Verify in this order
client → WinRM 5985/5986 → host
Where it usually breaks
WinRM transport health does not prove PowerShell/CIM/provider operation or final Windows state.
Script/input → command/module binding → local/remoting session → request accepted → command result → target object read-back → effective runtime state → workload.
WinRM automation proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Scope / identity | Exact source revision, hosts and execution identity are explicit | Selector drift, stale inventory or wrong token changes scope/authority |
| Operation | Tool/provider action and per-host result are traceable | Partial failure, hidden error semantics or environment differences are lost |
| Platform state | Persistent and effective state are read back | Command/cmdlet success is mistaken for convergence |
| Workload proof | Original service/application acceptance passes | Automation summary substitutes for actual runtime behavior |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5666