Windows


How to restart or shut down Windows through Remote Desktop 2

Assuming you have the following scenario: you are connected to a remote Windows machine via remote desktop and you need to restart it.
Soon you will realize that there is no restart button on the Start menu to click on….
So.. without that button, how do you restart your machine???

Do not fret as there is a way!

To Restart the remote Windows machine

Press the keys Windows+R on the keyboard together, it will pop-up the run command screen.
In the input line type shutdown /r /t 0 and hit the Enter button to restart the machine immediately.

  • The /r option instructs the machine to reboot
  • The /t 0 option sets the number of seconds to delay before executing the restart to 0 (initiate restart process immediately)

To Shut Down the remote Windows machine

Press the keys Windows+R on the keyboard together, it will pop-up the run command screen.
In the input line type shutdown /s and hit the Enter button to shut down the machine immediately.

To Stop a Shut Down or Restart process

To try and stop a shut down process, type shutdown /a and hit enter, it will attempt to abort the shutdown/restart sequence.
Keep in mind though that there still is a high chance for this to fail.


Windows: Kill a service that Windows Task Manager does not stop 2

In some cases, Windows Task Manager cannot stop a certain service. When the user right clicks on the service and selects the Stop Process option, the status of the service becomes Stopping but never actually stops. This happens when the developer of the service did not handle properly the signal instructing the service to shut down properly.

A way to stop it by force is to use the taskkill command with the help of the task manager. Press at the same time the keyboard keys Ctrl+Shift+Esc this will show the task manager. In the new window, switch to the tab Services. Find the service you want to stop and copy from the column PID the process ID number of the service. In the following example, if we wanted to kill the WinVNC4 service we would copy the number 1828.

TaskKill-Manager

Then, press at the same time the keyboard keys Windows+R that will pop up the Run Command screen. In the input line type the following:

taskkill /pid PID

and replace the PID with the PID we copied from the task manager before. In our example the input will become:

taskkill /pid 1828

and then hit the OK button.

Run-TaskKill


Windows: How to start “Remote Desktop Connection” without the icon shortcut

On a Windows machine we were using recently, all shortcuts icons to system applications got corrupt and they were not linking to the applications they were supposed to link to.

We needed to use Microsoft Remote Desktop Connection without the shortcuts icons. To do so we used the shortcut key of the Run Command screen that allows us to start any application that Windows knows where the binary is.

We pressed the keys Windows+R on the keyboard together and that showed the run command screen. In the input line we typed mstsc and hit the Enter button (you can also click on the OK button on the screen).

Run-mstsc

mstsc is the name that the executable file of Microsoft Remote Desktop Connection application holds in C:\Windows\System32. The easiest way to find the name of a binary is to check the icon shortcut on a machine that it is not corrupted or just search the internet for it.

Using all monitors

If you have multiple monitors that are arranged to form a rectangle, you can instruct mstsc by using the /span parameter to match the Remote Desktop width and height with the local virtual desktop and span across multiple monitors if necessary.

Executing mstsc /span will create a bigger window to the remote machine that will cover all your local monitors. Unfortunately, this window will not operate as if it is composed of multiple monitors. If you set a window to full screen, it will fill ALL local monitors as if they are one.