Test the transport first
From the client, run Test-WSMan servername. If it fails, investigate WinRM service state, listeners, DNS and firewall before changing credentials.
Check the listener
On the target server, review WinRM listeners with winrm enumerate winrm/config/listener. Confirm that the expected HTTP or HTTPS listener exists.
Check the firewall
Verify that the required WinRM traffic is permitted. Test TCP connectivity separately with Test-NetConnection servername -Port 5985 or the configured HTTPS port.
Check authentication
In a domain environment, use the expected domain identity and validate Kerberos dependencies. Workgroup or cross-domain scenarios may require additional TrustedHosts or certificate configuration.
Check permissions
Run PowerShell elevated when changing WS-Man configuration. Confirm that the account has the required local or delegated permissions on the destination.
Retest with a minimal command
After correcting one dependency, test a simple command such as Invoke-Command -ComputerName servername -ScriptBlock { hostname } before returning to the larger automation.
Useful commands
Test-WSMan servername
winrm enumerate winrm/config/listener
Test-NetConnection servername -Port 5985
Invoke-Command -ComputerName servername -ScriptBlock { hostname }What good troubleshooting looks like
Use evidence before configuration changes. Record the symptom, test result, change made and validation result so another engineer can repeat the procedure.
Symptom → hypothesis → direct test → controlled change → validation → documentation
Frequently asked questions
What should I check first?
Start with the exact failed path or dependency and test it directly before changing configuration.
Should I change production configuration immediately?
No. Capture the current state first and make one controlled change at a time.
How should I document the fix?
Record the symptom, commands, result, configuration change and validation result.
Related TechRunbook guides
Primary reference
This guide was independently written for TechRunbook. Technical details were checked against current Microsoft documentation. Microsoft Learn reference →
Need more infrastructure runbooks?
Explore the TechRunbook article library for Windows Server, VMware, Hyper-V, Azure, PowerShell and MABS troubleshooting.
Browse all articles →Explore more TechRunbook guides
Browse practical troubleshooting guides, PowerShell scripts, checklists and infrastructure resources for your environment.
Browse all articles →