Use this when WinRM listeners or authentication fail.
WinRM · Remote Access
1. Get-Service WinRM.
2. winrm enumerate winrm/config/listener.
3. Firewall 5985/5986.
4. Enable-PSRemoting.
5. Test from client.
WinRM service → listener → firewall → auth
Context & applicabilityCommon mistakes · platform/version boundaries
- Adding
*toTrustedHosts, which disables server authentication for NTLM connections. - Using HTTP listeners across untrusted networks without Kerberos.
- Double-hop failures (accessing a share from a remote session) — use resource-based constrained delegation or pass credentials explicitly, not CredSSP everywhere.
- Firewall rule only for the Domain profile while the server is on another profile.
Operational reference
Fast context before you go deeper.
Test-WSMan server01Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Test-NetConnection <host> -Port 3389— RDP portGet-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections— RDP enabled (0)Test-WSMan <host>— WinRMGet-Service sshd— OpenSSH server
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
WinRM configuration for servers:
Enable-PSRemoting -Force # listener, firewall, service
Set-Item WSMan:\localhost\Service\AllowUnencrypted $false
Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 2048
Get-PSSessionConfiguration | ft Name,Permission
Register-PSSessionConfiguration -Name HelpdeskJEA -Path .\helpdesk.pssc # JEA endpoint
Restrict who may connect (Remote Management Users, session configuration ACLs) and log PowerShell activity (module and script block logging) on servers accessed via WinRM.
ReferenceConfiguration & state1 section · depth on demand
Commands
Enable-PSRemoting -Force
winrm quickconfig
Test-WSMan server01
Enter-PSSession server01
Invoke-Command -ComputerName s1,s2 -ScriptBlock { Get-Service W32Time }
winrm enumerate winrm/config/listener
Documented example, not captured output. In a domain, Kerberos authenticates over HTTP 5985 with encrypted payload; outside a domain use HTTPS 5986 with certificates or TrustedHosts (less secure). Restrict with firewall rules to admin networks.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Remote Access → WinRM. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/ · confidence 94%