How to restart a computer via remote access: all methods

Restarting a computer is a forced or regulated event that allows you to complete the installation of programs and drivers or eliminate a software malfunction. The article discusses current methods of rebooting a PC through the remote control software used. It is recommended to re-read the instructions to avoid incorrect use of the functionality.

Restart a remote computer using the Restart-Computer cmdlet

The first and most common PowerShell-specific method is the Restart-Computer cmdlet. This cmdlet is easy to use with flexible parameters, some of which make script integration easier.

As you can see in the example below, this is generally the simplest method and a suitable solution for most PowerShell scenarios.

Restart-Computer -ComputerName $ComputerName -Force

  • ComputerName - The system you are about to restart. This parameter can accept the following network addresses: NetBIOS, IP address, or fully qualified domain name. For use on a local system, this option should not be used.
  • Force - Used if there are other users currently on the system. This option will allow you to restart the PC in any case, even if it is busy with any processes.
  • Wait - stops the workflow until the remote computer reboots
  • Timeout - Used with the Wait parameter, this ensures that a restart will not block the prompt and process indefinitely if a problem occurs.
  • Delay - By default, the cmdlet will poll a specific component for verification every 5 seconds, waiting for the remote system to become available. This option overrides this delay time period.

Software for remote administration

The final part of the material examines a selection of available software for remote control. Using utilities will allow you to execute the “remote computer reboot” command, as well as use auxiliary functions.

Chrome Remote Desktop

The program is optimized for use on various operating systems. It is distinguished by comprehensive accessibility and varied functionality. Allows you to generate code for integration with a computer. A mobile application has also been developed that works one-way - from a smartphone to a computer.

TeamViewer

A program in demand on the market, which is implemented on a variety of operating systems, including mobile platforms. In addition to implementing a quick system reboot, you will be able to record video materials and interact with other conference participants.

It is equipped with a password generation option, and the working interface is complemented by the option to display hints.

AnyDesk

Distributed on many operating systems, including Raspberry Pi. It is distinguished by an abundance of operational functions, as well as the free availability of the software if the program is not used by a commercial structure.

It is integrated with the function of recording remote control sessions, as well as the ability to quickly transfer files.

Ammy Admin

It is distinguished by the advantageous simplicity of the interface, as well as the speed of installation and configuration of the program. The disadvantage will be the fact that the software is distributed on Windows, excluding availability on other operating systems.

The program will allow you to quickly restart your computer and change users. The option to use voice chat is offered.

Aero Admin

Not so well-known, but easy to use program. Offers superior and simplified functionality. The downside is that you can use the free version for 17 hours (per month).

Installation and connection are simplified: launch the program, specify a PIN code, confirm and connect.

Advice: to install the programs described above, it is recommended to go exclusively to the official website of the developer company. This will prevent the installation of spyware.

Real VNC

It is worth mentioning one more application that is available on an expanded number of operating systems: Windows, Linux, Raspberry Pi, macOS.

Characterized by increased performance and functionality. To use the program, you will need to pay a subscription fee (subject to shared or corporate use). The home version is distributed free of charge.

More articles on the topic:

What programs can you use to control your computer remotely?

Black screen when starting Windows 7

How to set a sleep timer on a Windows 10 PC

Rating of programs for cleaning PC from junk

Rebooting a Remote Computer Using Invoke-CimMethod

Not specifically designed for remote system reboot. Invoke-CimMethod works by using the WIM method to reboot a remote system. Not as flexible as the Restart-Computer cmdlet, but you can remotely restart the system using a native PowerShell command.

Invoke-CimMethod -ComputerName $ComputerName -ClassName 'Win32_OperatingSystem' -MethodName 'Reboot'

  • ClassName — The name of the CIM class to use. In the case of the restart command, we use the Win32_OperatingSystem class.
  • ComputerName - Using the WsMan protocol, you can use any of the following types of remote addresses: NetBIOS, IP address, or FQDN.
  • MethodName - The method name is the WMI method for the target class. In case of a restart, you will need to use the Reboot method.

Keyboard shortcut

There is another simple option to achieve the desired result - use keyboard shortcuts. This method is suitable if there are no difficulties or freezes.

How to reboot remote desktop using a few buttons?

  • Press Alt+F4 on your keyboard at the same time;
  • The Select Action dialog box will appear;
  • in the drop-down menu you will see the item you need - select it with the mouse;
  • Click "OK" to begin the process of restarting your computer.

If you did everything correctly, you will see the result in a couple of seconds. The simplest way, take note of it.

Using shutdown.exe to remotely restart your computer

Let's take a break from PowerShell cmdlets and move on to the standard built-in executable file that Windows offers to restart the system - shutdown.exe.

shutdown.exe /m \\\\remotecomputer /r /t 5

  • r - indicates that the computer needs to be restarted rather than turned off.
  • e - allows you to document the reason for the reboot
  • t — time in seconds before the restart starts
  • c - an additional restart message that will be displayed on the screen before shutdown, as well as in a comment in the Windows event log and can contain up to 512 characters
  • f - force close all running applications, guarantees a reboot even if the computer is busy with any processes

Is it possible?

Users (especially inexperienced ones) are often faced with the question of how to turn off a computer via a remote desktop. This is not surprising, because the RDP interface simply does not have the usual button! You enter the Start menu, but there are no shutdown or system restart icons.

This was done specifically for your safety - RDP can be designed for several users at once. You need to protect yourself from accidentally terminating your computer session! But we know how to restart a computer via remote access and we will tell you about all the methods. They are!

Remotely restart your computer using PSExec.exe

One of the most commonly used utilities in the Sysinternals toolbox is psexec.exe. Offers several unique features that make interacting with a remote system easier. Taking a different approach from PowerShell and built-in utilities, psexec.exe creates a service on the remote system through which commands are then passed.

psexec.exe -d -h \\\\remotecomputer “shutdown.exe /r /t 0 /f”

  • d—use psexec non-interactively, without waiting for the process to complete.
  • h - If the target system is Vista or higher, run this process using an elevated account token.
  • n - specifies the timeout in seconds when connecting to a remote computer

First steps to turn off or restart your computer over the network

To perform this process correctly, you must be connected to the same local area network (LAN) as the computer you want to shut down or restart.

In addition, you need to know the username and password assigned on the computer (if installed). Without this information the process will not be possible.

Before you take any action, make sure that TCP port 445 is open in Windows Firewall on the computer you want to shutdown or restart.

To do this, go to “Control Panel” and “Security Center”. Then select the Windows Firewall option.

Go to the Exceptions tab. Typically, the option to allow file and printer sharing is already selected.

Today, many antiviruses take over the firewall function, then you need to look into them.

If it's not, select it and click OK. If you don't see the File and Printer Access line, click Add Port and select 445 TCP.

Then open Control Panel again. Select "System" and "Allow users to connect to this computer" on the "Remote" tab.

AnyDesk

Another program that allows you to remotely restart your computer. Of course, in terms of functionality it is significantly inferior to more powerful analogues, in particular TeamViewer. But, on the other hand, the developers proudly called their creation the fastest remote access application. It is not picky about device resources, is very easy to use, does not require complex settings, and, of course, has a high data transfer speed.

A free (incomplete) version is available for non-commercial use. However, the connection is not interrupted if the developers suspect the commercial use of the program (as is often the case with TeamViewer). The fact is that advanced versions are purchased for an additional fee, and only a basic set of functions is available in the free application. Therefore, there is simply no point in interrupting the connection.

The connection between PCs is the same as in TeamViewer. Each device is assigned an ID, which must be entered in the appropriate field. To avoid having to constantly enter your password, set up unlimited access. The reboot is started using standard methods: Alt+F4 or the Start menu. After this action, the connection will be interrupted and you will have to connect again.

The choice of program largely depends on the user's preferences. If functionality is more important to you, TeamViewer is considered the top software. But if you only need the basic set of features and interruptions annoy you, AnyDesk is a good option. The interface is very simple and you can understand it intuitively. Is it worth buying a license? It depends on the tasks you set. For private use, the free version is sufficient. Of course, there are other programs - Radmin, LiteManager, Ammyy admin. Choose an application that is convenient for you to work with. But remember that communication requires running utilities on both devices and an Internet connection.

Canceling the shutdown command

If the "shutdown" command is entered with a delay in its execution, you can cancel this action.

Step 1. Press the Win+R combination, type “CMD” in the line and click “OK”.

Press the combination Win + R, type in the CMD line and click “OK”

Step 2. Enter the command “shutdown -a” and press Enter.

Enter the command “shutdown -a” and press Enter

This will cancel the PC shutdown.

Cancel PC shutdown

Note! Any of the above commands can be used on your local PC without a remote connection.

Why are the above commands not used in RDP sessions?

Traditional Windows GUI methods do not provide the ability to remotely shut down or reboot a PC, even when an RDP session is open through an account that includes full administrator rights.

This is due to the need to protect the remote PC from unintentional shutdown by the user when the computer is used by several people.

It is possible to reboot or shutdown the remote PC using the command line

Fortunately, it is possible to reboot or shut down a remote PC using the command line after configuring it appropriately.

The Internet increasingly offers us more advanced services

Of course, in addition to the connection itself, other factors play a role here, both at the software and hardware levels. Along with the equipment for all this that we can use in these moments, the applications and platforms cannot be less. As an example, give the achievements made in Windows 10 or in the browsers we use every day. These programs, among many others, allow us to take full advantage of our online connections and services.

Likewise, the Internet will allow us to work with our devices remotely in different ways, which gives us many advantages. For example, in case we are in a hurry to leave the house and leave the computer or we need to reboot the system remotely, now we can and will see how to do this.

For all this, in these same lines we will show you several methods with which you can remotely restart your Windows PC, something that will be very useful. To say that this is something that we can accomplish either with internal functions of the operating system itself or with third-party applications.

Delayed "shutdown" command

Another useful option is “shutdown” - this is a remote shutdown or reboot of the PC with a command delayed for a while.

Let's say that, due to a thunderstorm, there is an urgent need to turn off a remote computer from one's own workstation, postponing the command so that users of the switched-off PC can save their data.

Type the command “shutdown -s -f -m Computer name -t 60 -c Message.” and press Enter.

Type the command and press Enter

This command will shut down the computer (-s), force all applications to close (-f), assign the remote computer by its name (-m) (since the command is issued from another PC), give a time delay of 60 seconds (-t 60) and will issue a message (-c) that will appear on the remote computer notifying users of the reasons for the procedure.

To shut down or restart your computer over the network, use the command - net use

To obtain the necessary rights, you must first use the net use command on the target computer.

Before starting the whole operation, you will also need the address of the destination computer. To enter the NET USE command, launch the command prompt and enter the command below:

  • Net use \\IP of target PC /user:administrator

Then enter the administrator name and password - if the operation was successful, you will see the corresponding information on the screen.

Classic way

When using TeamViewer and similar programs, you get full access to the functionality of the PC. Therefore, it is enough to perform the standard reboot procedure through the Start menu:

  1. Click on the Start icon on the taskbar or press the corresponding key on your keyboard.

  1. Click on the power icon and select “Restart” from the menu.

Win32 Commands to Reboot Windows XP

In Windows XP, you can also call the “Shut Down Windows” dialog via the command line.

Step 1. Press the Win+R combination, type “CMD” in the line and click “OK”.

Press the combination Win + R, type in the CMD line and click “OK”

Step 2. Enter the command “rundll32 msgina,ShellShutdownDialog” and press Enter.

Enter the command “rundll32 msgina,ShellShutdownDialog” and press Enter

The Shut Down Windows dialog appears.

Window with Shut Down Windows options

Note! Commands for older versions of Windows, for example, "rundll32 user.exe,ExitWindowsExec" do not work in Windows XP, and you can use the "shutdown" command with the above arguments instead.

How to turn on a computer remotely over a network

Theoretically, after appropriate configuration of the router, you can turn on the computer via the Internet.

More specifically, it is about forwarding a UDP packet from a specific port to all devices connected to the network.

Only in practice does such a device allow such operations (IP address xxx255 for type C networks).

The process is done by sending a Magic Packet to your public IP address and corresponding port (as described above), which will shut down the computer.

One configuration provides access to all devices on a given network, but thanks to the appropriate settings, each of them can operate independently of the others.

Reboot the PC via the command line

Before you can launch Powershell and enter the appropriate commands, you must enable the Remote Registry service on both devices. In Windows 10 you can do this as follows:

  1. First, open the Run window using the Win + R combination and enter the command “services.msc”.

  1. In the list of services, find the line “Remote Registry” and double-click on it.

  1. In the Startup Type field, set the option to Automatic.

  1. Click the “Apply” button and then “Run”.

  1. After that, close the Settings and Services window.

To use PC/laptop reboot via the command line, you need to know its name. To do this, do the following:

  1. On the remote PC, you need to open “Explorer” and click on “This PC”.

  1. In the top bar, click Computer and then Properties.

  1. Pay attention to the “Computer name” field. Remember or copy the device name. It will be useful for the command in cmd.

Now we return to the administrator's PC. Knowing the name of the second device, you can reboot it, even if it is frozen and does not respond to your actions. Let's move on to rebooting a working or frozen computer:

  1. Launch command prompt. To do this, enter the appropriate query in the search. After that, right-click on the program and select “Run as administrator.”

  1. Reboot parameters and conditions can be specified using written commands. To avoid remembering them, it is better to use a graphical interface. It can be accessed using the “shutdown /i” command.

  1. The “Remote Shutdown Dialog” will appear on the screen. You need to add a second PC to the list and connect to it. To do this, click on the “Add” button.

  1. Enter the name of the device you found in the previous manual.
  1. Select your PC and specify the desired action. You can also enter a reason and note here. To start the procedure, click “OK”.

You can reboot a PC remotely only if it was previously connected to a network or a remote administration program. If the device freezes before setting up the connection, then all the steps described will not help. Make sure in advance that you have several access methods: via the network and via the Internet using a special program. The equipment can freeze at any moment, and you will be prepared for such a situation.

Rating
( 1 rating, average 4 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]