WinRM
Cheat sheet · https://pcornel.dk/topic.php?topic=3051
Answer
WinRM is the Windows implementation of WS-Management and provides a management transport used by Windows PowerShell remoting and other clients. A WinRM listener/service can be healthy while a PowerShell endpoint, authentication method or authorization policy still prevents a PSRP session.
Remember
- WinRM service/listener health is a lower boundary than PowerShell endpoint health.
- HTTP/HTTPS WinRM listeners define transport exposure; authentication and session authorization remain separate.
- Firewall/network reachability can block transport before PowerShell is involved.
- TrustedHosts is not a general “fix remoting” switch; it changes trust behavior and must be scoped intentionally.
Test-WSMan-style success proves WSMan response, not successful PowerShell command execution.
First checks
winrm enumerate winrm/config/listener— listeners$PSVersionTable— PowerShell edition and versionGet-Command <name>— which cmdlet/function/exe runsGet-Help <cmdlet> -Full— syntax and parametersGet-ExecutionPolicy -List— execution policy per scope
Verify in this order
WinRM service → listener on 5985/5986 → firewall → authentication → PowerShell endpoint
Where it usually breaks
First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.
PowerShell → WinRM reference map
| Item | Meaning | Evidence boundary |
|---|---|---|
| Network path | Reach listener address/port | not proof WinRM application response |
| Listener | WSMan transport binding | not proof authentication/endpoint |
| WinRM service | WSMan implementation | not proof PSRP session config |
| Authentication/trust | Identity boundary | not proof remote command authorization |
| PowerShell endpoint | Runspace/session config | separate from listener existence |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3051