Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinRM client cannot complete the operation within the time specified

This is what happens when I try and connect to Powershell on my remote machine:

PS C:\Users\Jonathan> Test-WSMan -ComputerName 54.228.XX.XX
Test-WSMan : The WinRM client cannot complete the operation within the time specified. Check if the machine name is val
id and is reachable over the network and firewall exception for Windows Remote Management service is enabled.
At line:1 char:11
+ Test-WSMan <<<<  -ComputerName 54.228.XX.XX
    + CategoryInfo          : InvalidOperation: (54.228.XX.XX:String) [Test-WSMan], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand

On my remote computer, I've confirmed that WinRM is running:

PS C:\Users\Administrator> net start winrm

The Windows Remote Management (WS-Management) service is starting.
The Windows Remote Management (WS-Management) service was started successfully.

I've confirmed that it is listening:

PS C:\Users\Administrator> winrm e winrm/config/listener

Listener
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 10.35.XXX.XXX, 127.0.0.1...

and I've chosen to trust all hosts:

PS C:\Users\Administrator> Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force

and finally, I've allowed inbound connections on port 5985. Have I missed something?!

like image 772
Jonathan Avatar asked Feb 26 '26 02:02

Jonathan


1 Answers

The unfortunate solution for us, was to start from scratch and reinstall windows. After spending a week wasting our time, that fixed it.

like image 165
Action Dan Avatar answered Feb 27 '26 19:02

Action Dan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!