Tips and Tricks

How to fix unresponsive remote server


It’s a common practice to get server on your network to stuck. The server might not reachable either by a ping command or a remote desktop connection.

We will show here how to fix these issues with simple PowerShell commands.

Case One – Server is unreachable

It is not visible on the network by other applications and the ping command returns a timeout error.

Simply reboot the faulty server with the following command in PowerShell window:

Restart-Computer -ComputerName <server-host-name>

Important: your account must have administrative rights on the remote server.

Case Two – Connection Error

In this case, the server might be still visible on the network, but when you try to establish a remote desktop connection, it responds with a bad credentials error.

Often, it means that someone previously connected to the server and did not sign out. After certain amount of time, this user account got frozen.

First, we will check what account is currently logged to the server. In PowerShell, run the following command:

quser /server:<server-host-name>

Notice the number in the ID column returned. We will use it to disconnect the currently logged accounts.

Now run the following command:

logoff <ID>/server:<server-host-name>

Repeat this process for each ID.

Finally, back to Case One, and reboot the server.