(Image credit: Windows Central)
If you manage devices over the network, you probably use a remote connection and the Start menu power options, or call someone to execute to perform shutdowns or restarts manually. However, Windows 10 also includes the shutdown.exe tool to make this process a little easier.
On Windows 10, shutdown.exe is a command-line tool that allows you to manage various power options, including shut down, restart, and hibernate for local and remote devices. Also, it has the ability to create a record with the reason for the action, display custom text messages to users, and more.
In this Windows 10 guide, we will show you two easy ways to shut down computers over the network.
- How to shutdown PC remotely with command
- How to shutdown PC remotely with GUI
How to shut down PC remotely with command
Although the shutdown command offers the ability to shut down or restart a computer over the network, there are security settings you must configure to make it work.
Configure remote device
To set up the remote computer to allow remote command executions, use these steps:
Warning: This is a friendly reminder that editing the Registry is risky and can cause irreversible damage to your installation if you don’t do it correctly. It’s recommended to make a full backup of your PC before proceeding.
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to disable the User Account Control for remote executions and press Enter:
reg add HKLM\Software\Microsoft\windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
After you complete the steps, the device will be open to receive commands remotely from authenticated users.
All the latest news, reviews, and guides for Windows and Xbox diehards.
If you want to revert the changes to improve the device security, you can use the exact instructions outlined above, but on step No. 3, make sure to run this command:
reg add HKLM\Software\Microsoft\windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 0 /f
.
Shut down remote device
To use the Command Prompt to shut down a computer remotely, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to connect to the IPC$ share (or null session connection) and press Enter:
net use \\REMOTE-PC\ipc$In the command, replace REMOTE-PC for the name or IP address of the remote computer.For example, this command connects to the Office-PC computer:net use \\Office-PC\ipc$ - Confirm the account name located in the remote device and press Enter.
- Confirm the account password and press Enter.
- Type the following command to shut down the remote computer and press enter:
shutdown /s /m \\REMOTE-PC /t TIME /c "COMMENT" /fIn the command, replace REMOTE-PC for the name or IP address of the remote computer, TIME for the number of seconds to wait before beginning the shutdown process, and replace COMMENT for the custom dialog you want to send the user. If you want to restart the device, use the/rinstead of thesoption.For example, this command will notify the user, and forces a shutdown on the device called «Office-PC» closing all application without warnings after one minute:shutdown /s /m \\Office-PC /t 60 /c "This PC will shut down in one minute for maintenance." /fIf no one is using the computer, you can send a command that shuts down the device immediately. Here’s an example:shutdown /s /m \\Office-PC /t 0 /f
Once you complete the steps, the remote host will power off according to the command configuration.
If you want to disconnect from the IPC$ share, run the following command: «net use * /delete» (without quotations) and press Y to confirm. If you plan to use this command, you may need to remap previously connected network drives.
How to shut down PC remotely with GUI
The tool also includes the «Remote Shutdown Dialog,» a user interface that makes it a litter easier to send the shutdown command to a remote computer across the network.
Configure remote device
To configure the remote computer to allow remote command executions, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to disable the User Account Control for remote executions and press Enter:
reg add HKLM\Software\Microsoft\windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
After you complete the steps, the device will be open to receive commands remotely from authenticated users.
If you want to revert the changes to improve the device security, you can use the exact instructions outlined above, but on step No. 3, make sure to run this command:
reg add HKLM\Software\Microsoft\windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 0 /f
.
Shut down remote device
To turn off one or multiple computers with the Remote Shutdown Dialog, use these steps:
- Open Start.
- Search for Run and click the top result to open the Run dialog.
- Type the following command and click the OK button.`shutdown /i’
- Click the Add button.
- Type the name (or IP address) of the remote computer.
- Click the OK button.
- (Optional) Repeat steps No. 4, 5, and 6 to add more devices to the list.
- Use the «What do you want these computers to do» option and select whether you want to shut down, restart, or annotate an unexpected shutdown.
- Check the «Warn user of the action» option to alert the user.
- Use the display warning option to specify how long the warning should display on the screen in seconds.Quick tip: If the option is grayed out, in the «What do you want these computers to do» option, reselect the action to make it available.
- Under the «Shutdown Event Tracker» section, use the Option drop-down menu and select one reason you are shutting down the computers.
- Check the Planned option if you want to register the action as planned. Otherwise, the action will register as «Unplanned.»
- In the «Comments» section, type the message you want the user to see — for example, «This PC will shut down in one minute for maintenance.»Quick note: If you do not complete this step, the OK button will be grayed out.
- Click the OK button.
Once you complete the steps, the computers in the list will shut down according to your configuration and message.
More Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
- Windows 10 on Windows Central — All you need to know
- Windows 10 help, tips, and tricks
- Windows 10 forums on Windows Central
Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.
,
As an Administrator on Windows computers, you may occasionally need to restart or shutdown a remote computer or server.
Remotely restarting a computer is very useful in cases where you need to restart several computers at the same time, because you don’t need to visit each machine separately.
This guide provides five different methods for remotely shutting down or restarting Windows computers and servers that are on the same network. Therefore, for remote restart or shutdown to work, ensure the all computers are on the same network.
How to Remotely Restart or Shutdown Windows 10/11 PC’s or Windows Servers.
Part 1. Allow Remote Commands on Target Computer.
Part 2. How to Remote Restart or Remote Shutdown Windows.
- Command Prompt
- PowerShell
- PsShutdown
- Remote Shutdown Dialog
- Remote Desktop
Part 1. Allow the Execution or Remote Commands on Target Computer.
Before you can remotely reboot or shut down a Windows computer or server, you will first need to make some modifications to the target computer(s) in order to accept the remote restart or shutdown commands.
Step 1. Disable User Account Control (UAC)
To allow the execution of remote commands, you need to disable the UAC though registry, on the target machine. To do that:
1. Simultaneously press the Windows + R keys to open run command box.
2. In run command box, type: cmd and press CTRL + SHIFT + Enter to open Command Prompt as Administrator.
2. In command prompt, give the following command and hit Enter.
- reg add HKLM\Software\Microsoft\windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
3. Restart the PC.
Step 2. Allow Remote Shutdown from PowerShell in the Windows Firewall.*
* Note: This modification is needed only if you want to remotely restart or shutdown a pc using PowerShell commands. (See Method-5 below)
1. Type firewall into the search box and then open Firewall & network protection.
2. Click Allow an app through firewall.
3. Now tap on the Change settings button.
4. Now find and allow the Windows Management Instrumentation (WMI) feature for the Private network only. When done, click OK.
Part 2. How to Remote Restart or Remote Shutdown a Windows Computer or Server.
Method 1. Restart or Shutdown a Remote Computer using Command Line.
Command prompt is the fastest way to restart or shutdown a remote computer.*
* Attention: To be able to shutdown or restart a computer remotely you must have administrative privileges on the remote pc**, and the remote computer must be in the same workgroup or domain as your computer.
** Note: If you haven’t admin privileges on the remote PC, but you know the Username and the Password of a user on the remote PC that has admin privileges, skip to next method.
1. To RESTART A REMOTE COMPUTER FROM COMMAND PROMPT, give this command:
- shutdown /m \\COMPUTER /r
* Note: Replace the word «COMPUTER«, with the Name or the IP Address of the remote pc that you want to restart or shutdown.
e.g: to remote restart a remote pc with name «Desktop10» and IP «192.168.1.100», issue one of the following commands:
- shutdown /m \\192.168.1.100 /r
- shutdown /m \\Desktop10 /r
After the execution of the above command the user will see the following on their screen
2. To SHUTDOWN A REMOTE COMPUTER FROM COMMAND PROMPT, give this command:
- shutdown /m \\COMPUTER /s
For example: to remote shutdown the pc with name «Desktop10», give this command:
- shutdown /m \\Desktop10 /s
Here are some useful switches that can be used with the shutdown command:*
- /s Shutdown the computer.
- /r Reboot the computer.
- /t xxx Set the time-out period before shutdown to xxx seconds
- /c «comment» Comment on the reason for the restart or shutdown.
- /f Force running applications to close without forewarning users.
- /a Abort the system shutdown or restart.
* Note: To view all the available switches and their description type: shutdown /?
Example: To remotely reboot the «Desktop10» computer after 30 seconds and inform the user that the reboot is for maintenance purposes, issue the following command:
- shutdown /m \\Desktop10 /r /t 30 /c «Your PC must be restarted for maintenance in 30 seconds»
After executing the above command the user on the remote pc, will see the following on the screen:
Method 2. Shutdown or Restart a Remote Computer Using PowerShell.
PowerShell may also be used to shut down or restart a remote computer. The disadvantage of PowerShell is that it does not provide as many options as the shutdown command. Also, there is no option to display a countdown or a custom message to the users, or to inform them that they will be logged out. *
* Note: Before you continue to remotely shutdown a pc through PowerShell, enable the Windows Management Instrumentation (WMI) in Windows Firewall on the remote pc (See Step-2 above)
1. To RESTART A REMOTE COMPUTER FROM POWERSHELL, enter the following command:*
- Restart-Computer -computername COMPUTER -force
Note: Replace the word «COMPUTER«, with the name or the IP Address of the remote pc that you want to restart or shutdown.
Example1: To remotely restart the pc with name «IP95» and IP «192.168.1.201», issue one of these commands:
- Restart-Computer -computername IP95 -force
- Restart-Computer -computername 192.168.1.201 -force
Example2: To restart two remote PC’s with IP’s «192.168.1.200» & «192.168.1.210», issue this command:
-
Restart-Computer -computername 192.168.1.200, 192.168.1.210 -force
2. To RESTART A REMOTE COMPUTER FROM POWERSHELL USING THE CREDENTIALS of a DOMAIN USER OR OF A USER ON THE REMOTE COMPUTER, issue the following command:
- Restart-Computer -computername COMPUTER -Credential Username -force
Example1: To restart the remote computer «IP95» with IP «192.168.1.201», using the remote pc’s credentials (username «John»), give one of these commands and type the password when prompted:
- Restart-Computer -computername IP95 -Credential John -force
- Restart-Computer -computername 192.168.1.201 -Credential John -force
Example2. To restart the remote computer «IP95» with IP «192.168.1.201», using the domain user «John», on the Domain «WINTIPS» give one of these commands and type the password when prompted:
-
- Restart-Computer -computername IP95 -Credential WINTIPS\John -force
- Restart-Computer -computername 192.168.1.201 -Credential WINTIPS\John -force
3. To TURN OFF A REMOTE COMPUTER FROM POWERSHELL, enter the following command:
- Stop-Computer -computername COMPUTER -force
Example1: To shutdown the remote pc with name «IP95», issue this command:
- Stop-Computer -computername IP95 -force
Example2. To shutdown the remote computer with IP «192.168.1.201», using the domain user «John», on the Domain «WINTIPS» give this command and type the password when prompted:
-
Stop-Computer -computername 192.168.1.201 -Credential WINTIPS\John -force
Example3: To remotely shutdown two remote PC’s with IP’s «192.168.1.200» & «192.168.1.210», issue this command:
-
Stop-Computer -computername 192.168.1.200, 192.168.1.210 -force
Method 3. Restart a Remote PC using PsShutdown.
PsShutdown is a command-line utility built by Microsoft and is similar to the shutdown command utility of the Windows, but with the ability to shut down or restart a remote computer using the credentials of a user on the remote machine who has administrative rights.
1. Download PsTools (PsShutdown is included in PsTools).
2. After download, double-click at PsTools.zip file and extract it to a folder.
3. Now open Command Prompt, and navigate to PsTools folder. *
* Note: to make your life easier, I suggest to copy the PsTools folder to C:\
4. Now, according to what you want to do, issue the corresponding command below:*
* Notes:
1. Replace the word «COMPUTER«, with the name or the IP Address of the remote pc that you want to restart or shutdown.
2. -r Restarts the remote computer.
3. -s Shut down the remote computer.
4. /t xxx Specifies countdown in xxx seconds until shutdown
5. -u Specifies the optional user name for login to the remote computer.
6. -p Specifies optional password for the given username.
7. Type psshutdown.exe /? to view all the available switches
5. To RESTART A REMOTE COMPUTER USING PsShutdown, type:
- psshutdown.exe \\COMPUTER -u COMPUTER\Username -p «Password» -r
e.g: to restart the remote pc «Desktop10» with IP «192.168.1.201», using the remote pc’s credentials (username «John» and password «ct»), give one of these commands:
- psshutdown.exe \\Desktop10 -u Desktop10\John -p «ct» -r
- psshutdown.exe \\192.168.1.201 -u 192.168.1.201\John -p «ct» -r
6. To SHUTDOWN A REMOTE COMPUTER USING PsShutdown, type:
- psshutdown.exe \\COMPUTER -u COMPUTER\Username -p «Password» -s
e.g: to shutdown the remote pc «Desktop10», using the remote pc’s credentials (username «John» and password «ct»), give this command:
- psshutdown.exe \\Desktop10 -u Desktop10\John -p «ct» -s
Method 4. Remote Reboot or Shutdown Multiple PC’s using Remote Shutdown Dialog in Active Directory Domain.
If you’re an Administrator in an Active Directory Domain, you can restart simultaneously multiple computers, by using the Remote Shutdown Dialog tool.
1. Simultaneously press the Windows + R keys to open run command box.
2. In run command box, type: shutdown /i and press Enter.
3. Click Add and then type the name(s) of the remote computer(s) that you want to shutdown, or click the Browse button to choose them from the Active Directory.
4. Select Restart or Shutdown from the «What do you want these computers do» drop-down menu.
5. If you want to warn users about the shutdown/restart, check the corresponding box and optionally enter a reason in the comment section. When done, click OK.
Method 5. Remote Restart or Shutdown a a PC using Remote Desktop.
A computer can also be shut down or restarted via remote desktop connection (RDP). So, if you have access to the remote PC that you want to restart or shutdown through RDP, proceed as follows:
Step 1: Enable Remote Desktop Access on Remote PC.*
* Note: If the remote desktop access is already enabled, skip to next step.
To be able to shutdown or restart a remote PC, through Remote Desktop Connection, you have first to allow the remote desktop access on the remote PC. To do that:
1. Go to Start > Settings > System.
2. Select Remote Desktop on the left and then Enable Remote Desktop at the right pane.
Step 2. Shutdown or Restart the Remote Pc using Remote Desktop Connection.
To restart a remote PC using RDP:
1. Simultaneously press the Windows + R keys to open run command box.
2. In run command box, type: mstsc and press Enter.
3. Type the name or the IP address of the remote computer that you want to shutdown or restart and click Connect.
4. Type the target’s computer user credentials and click OK to connect.
5. After entering in the remote desktop, press Alt + F4 to open the Shut Down dialog.
6. Choose Restart or Shutdown from the drop-down list and click OK.
That’s it! Which method worked for your?
Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.
If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free:
- Author
- Recent Posts
Konstantinos is the founder and administrator of Wintips.org. Since 1995 he works and provides IT support as a computer and network expert to individuals and large companies. He is specialized in solving problems related to Windows or other Microsoft products (Windows Server, Office, Microsoft 365, etc.).
-
Home
-
News
- How to (Remotely) Shut Down Windows 10 with CMD Command Line
By Alisa |
Last Updated
To shut down Windows 10 PC, one quick way is to use Command Prompt commands. Check how to shutdown Windows 10 using command line in CMD. Also learn how to remotely shut down a Windows 10 PC with CMD. As the best Windows 10 software mate, MiniTool software also provides you data recovery, hard drive management, system backup and restore tools.
- What is the command for Windows 10 shutdown in CMD?
- How do I shut down Windows 10 from Command Prompt?
- How do I shut down a computer remotely with Command Prompt?
If you meet Windows 10 won’t shut down problem by using the usual ways, you can try the unusual way to shut down your Windows 10 PC. Learn how to shut down Windows 10 with command line in CMD (Command Prompt) below. This is helpful when computer freezes, gets stuck or crashes because of some errors and can’t shut down. (Related: How to Repair Windows 10)
How to Shut Down Windows 10 with Command Line in CMD
Step 1. You can press Windows + R, type cmd, and press Enter to open Command Prompt in Windows 10.
Step 2. In Command Prompt window, you can type shutdown /s command line, and hit Enter, then the CMD.exe will perform the Windows shutdown action.
Tip: You can also type shutdown command in CMD after you enter into Command Prompt window, and it will present a list of different options for Windows 10 shutdown. Different command lines perform different operations. You can check some of the Windows shutdown commands below.
- shutdown /s – just shut down your Windows 10 computer.
- shutdown /r – shut down and restart the computer.
- shutdown /a – abort the system shutdown before the timeout.
- shutdown /l – log off the computer.
- shutdown /f – force close running applications without forewarning users.
- shutdown /m \\computername – specify the target computer you want to shut down.
- shutdown /t xxx – set the timeout period before shutdown to xxx seconds. (Related: schedule shutdown Windows 10)
- shutdown /c “comment” – comment on the reason for the restart or shutdown.
Windows 10 Shutdown Shortcut
Some of you may also wonder how to use keyboard shortcut to shut down Windows 10. You can press Alt + F4, and it will pop up the Shutdown dialog. You can then use the arrow keys on the keyboard to select an option and press Enter to power off Windows 10 PC or laptop.
How to Remotely Shut Down or Restart a Windows 10 Computer with CMD
You can even use Command Prompt to remotely restart or shut down a Windows 10 computer over the Internet. The Windows PCs should be connected to the same network.
After you enter into Command Prompt, you can type shutdown /m \\computername /r /f command line, and hit Enter. This will remotely restart the target Windows 10 computer and force close all running programs on it.
To shut down a Windows 10 computer remotely, you can type the command line: shutdown /m \\computername /s /c “This computer will shut down, please save all work.” /t 100, and hit Enter. This command line will shut down Windows 10 computer in CMD, along with forcing all running programs to close, show the warning message, and count down 100 seconds before the remote computer shuts down.
You can also remotely shutdown PC via Shutdown dialog.
- You can type shutdown /i command in CMD, and press Enter to open Remote Shutdown Dialog.
- Click Add or Browse button to add the target computers to the list. You can type the computer network name in \\computername format or just type the computer name.
- Then you can set the shutdown options: restart or shutdown. You can also set the shutdown settings like displaying a warning.
- Then you can run the corresponding Windows shutdown commands to shut down or restart a batch of computers in the same network.
Bottom Line
This post gives some tips on how to shut down Windows 10 with command line in CMD, and how to how to restart or shut down remote computers with CMD. If you have better ideas, please do not hesitate to share with us.
About The Author
Position: Columnist
Alisa is a professional English editor with 4-year experience. She loves writing and focuses on sharing detailed solutions and thoughts for computer problems, data recovery & backup, digital gadgets, tech news, etc. Through her articles, users can always easily get related problems solved and find what they want. In spare time, she likes basketball, badminton, tennis, cycling, running, and singing. She is very funny and energetic in life, and always brings friends lots of laughs.
Загрузить PDF
Загрузить PDF
Командная строка — это функция Windows, которая обеспечивает точку входа для ввода команд MS-DOS (Microsoft Disk Operating System) и других компьютерных команд. Командную строку можно использовать для удаленного выключения или перезагрузки другого компьютера. Кроме того, через Командную строку также можно получить доступ к окну «Диалог удаленного завершения работы». Чтобы удаленно завершить работу другого компьютера, у вас должен быть административный доступ к целевому компьютеру. На целевом компьютере также должен быть включен общий доступ к файлам и принтерам.
-
Это кнопка со значком Windows в левом нижнем углу.
-
Система найдет командную строку и отобразит ее в верхней части меню «Пуск».
-
Ее иконка выглядит как черный экран с белой надписью. Если щелкнуть по этой иконке правой кнопкой мыши, справа от нее появится контекстное меню.
-
Командная строка откроется с правами администратора.
- Чтобы запустить Командную строку от имени администратора, вам нужно войти в Windows, используя учетную запись администратора.
-
Это первая строка для выключения компьютера.
- Чтобы увидеть полный список команд выключения, введите shutdown /?.
-
Добавьте этот текст через один пробел после команды «shutdown» в той же строке. Замените «имя_компьютера» фактическим именем целевого компьютера.
-
Если вы хотите завершить работу целевого компьютера, введите «/s» через один пробел после имени компьютера. Чтобы перезагрузить компьютер, введите «/r» через один пробел после имени компьютера.
-
Введите этот параметр через один пробел после «/s» или «/r». Это приведет к принудительному закрытию всех программ на удаленном компьютере.
- Примечание: при принудительном закрытии программ пользователь может потерять все несохраненные данные. Перейдите к следующему шагу, чтобы узнать, как предупредить пользователя и дать ему несколько секунд, чтобы сохранить свою работу перед тем, как компьютер выключится или перезагрузится.
- К этому моменту команда должна выглядеть примерно так: shutdown \\workspace1 /r /f. Нажмите ↵ Enter, чтобы немедленно перезагрузить компьютер. Перейдите к следующему шагу, чтобы добавить таймер с примечанием.
-
Добавьте этот параметр через один пробел после «/f» в той же строке. Он позволит вам отправить сообщение на целевой компьютер.
-
Добавьте его через один пробел после «/c». Сообщение должно предупредить пользователя удаленного компьютера о выключении компьютера. К примеру, можно напечатать: «Этот компьютер перезагрузится. Пожалуйста, сохраните свою работу». Убедитесь, что сообщение заключено в кавычки (» «).
-
Добавьте этот параметр через один пробел после сообщения из предыдущего шага. Так вы дадите пользователю несколько секунд, чтобы сохранить свою работу, прежде чем компьютер выключится. К примеру, /t 60 даст пользователю шестьдесят секунд, чтобы сохранить свою работу, прежде чем компьютер выключится или перезагрузится.
-
Ваша команда должна выглядеть примерно так: shutdown m\\workspace1 /r /f /c "Этот компьютер перезагрузится через 60 секунд. Пожалуйста, сохраните свою работу." /t 60.
- Если вы получили сообщение «Отказано в доступе», убедитесь, что вы вошли в учетную запись администратора и имеете административный доступ к целевому компьютеру. Перейдите к Методу 3, чтобы узнать, как включить общий доступ к файлам и принтерам на обоих компьютерах и разрешить его через брандмауэр Windows.
- Если вам не удается подключиться к реестру на целевом компьютере, перейдите к методу 4, чтобы узнать, как изменить реестр на целевом компьютере.
Реклама
-
Это кнопка со значком Windows в левом нижнем углу.
-
Система найдет командную строку и отобразит ее в верхней части меню «Пуск».
-
Ее значок выглядит как черный экран с белой надписью. Если щелкнуть по нему правой кнопкой мыши, справа от него появится контекстное меню.
-
Командная строка откроется с правами администратора.
- Чтобы запустить Командную строку от имени администратора, вам нужно войти в Windows под учетной записью администратора.
-
Откроется окно Диалога удаленного завершения работы.
-
-
Целевой компьютер — это компьютер, который вы хотите выключить или перезагрузить. Введите IP-адрес этого компьютера в окне «Добавление компьютеров» и нажмите «ОК».
- Если вы не знаете частный IP-адрес целевого компьютера, найдите его на нем.
-
выключиться или перезагрузиться. Используйте выпадающее меню «Выберите желаемое действие для компьютеров», чтобы выбрать «Завершение работы» или «Перезагрузка».
-
Установите флажок
рядом с параметром «Предупредить пользователей об этом действии» (необязательно). Это позволит вам установить таймер на выключение компьютера(ов).
-
Укажите количество секунд до выключения компьютера(ов) (необязательно). Введите число в поле внутри строки «Отображать предупреждение: [] секунд», чтобы установить таймер на выключение компьютера.
-
Установите флажок
рядом с параметром «Запланированная остановка» (необязательно). Это позволит вам указать причину для удаленного выключения или перезагрузки.
-
Используйте раскрывающееся меню под пунктом «Причина», чтобы выбрать наиболее подходящую причину для выключения/перезагрузки. Например, «Оборудование: Обслуживание (Запланированное)».
-
Оно отобразится на целевом компьютере. Пример: «Этот компьютер выключится через 60 секунд. Пожалуйста, сохраните свою работу».
-
- Если вы получили сообщение «Отказано в доступе», убедитесь, что вы вошли в учетную запись администратора и имеете административный доступ к целевому компьютеру. Перейдите к Методу 3, чтобы узнать, как включить общий доступ к файлам и принтерам на обоих компьютерах и разрешить его через брандмауэр Windows.
- Если вам не удается подключиться к реестру на целевом компьютере, перейдите к Методу 4, чтобы узнать, как изменить реестр на целевом компьютере.
Реклама
-
Выполните следующие действия, чтобы открыть Панель управления.
- Откройте меню Пуск в Windows.
- Введите Панель управления.
- Выберите Панель управления.
-
Это зеленый текст рядом с иконкой, на которой изображены два компьютерных экрана перед земным шаром.
- Перейдите к следующему шагу, если вы не видите эту опцию.
-
Нажмите на Центр управления сетями и общим доступом рядом с иконкой, на которой изображены четыре подключенных компьютера.
-
Нажмите на Изменить дополнительные параметры общего доступа в нижней части боковой панели.
-
Нажмите на круглую кнопку рядом с надписью Включить сетевое обнаружение, чтобы компьютер мог видеть другие компьютеры.
-
Нажмите на круглую кнопку рядом с надписью Включить общий доступ к файлам и принтерам, чтобы разрешить совместное использование файлов и принтеров.
-
-
Нажмите на Сеть и Интернет в адресной строке в верхней части Панели управления. Вы вернетесь в меню «Сеть и Интернет» Панели управления.
-
-
Это вторая опция под разделом «Брандмауэр Windows».
-
Установите флажок
рядом с пунктом «Общий доступ к файлам и принтерам» в списке разрешенных программ и компонентов.
-
Установите флажок
в столбце «Частная», справа от пункта «Общий доступ к файлам и принтерам» в списке разрешенных программ и компонентов.
-
Нажмите ОК в нижней части Панели управления, чтобы сохранить и применить сделанные вами изменения.
Реклама
-
Это кнопка со значком Windows в левом нижнем углу. В более новых версиях Windows пользователя обычно лишают прав администратора при попытке получить удаленный доступ к компьютеру. Это можно исправить, внеся изменения в реестр.
-
- Предупреждение: редактирование или удаление элементов в редакторе реестра может привести к необратимому повреждению операционной системы. Действуйте на свой страх и риск!
-
Откроется «Редактор реестра».
-
Используйте папки в левой боковой панели для навигации в Редакторе реестра. Для перехода к папке «System» в разделе «Policies» выполните следующие действия:
- Дважды щелкните по папке HKEY_LOCAL_MACHINE.
- Дважды щелкните по папке SOFTWARE.
- Дважды щелкните по папке Microsoft.
- Дважды щелкните по папке Windows.
- Дважды щелкните по папке CurrentVersion.
- Дважды щелкните по папке Policies.
- Дважды щелкните по папке System.
-
Выполните следующие шаги, чтобы создать новый параметр DWORD в папке «System».
- Щелкните правой кнопкой мыши в окне справа от боковой панели.
- Наведите курсор на Создать.
- Выберите Параметр DWORD (32 бита).
-
При создании нового параметра DWORD имя будет выделено синим цветом. Тут же введите «LocalAccountTokenFilterPolicy», чтобы переименовать его.
-
Щелкните правой кнопкой мыши по LocalAccountTokenFilterPolicy, чтобы отобразить меню справа от параметра.
-
Откроется окно редактора для параметра DWORD..
-
Измените значение с «0» на «1» в поле под строкой «Значение».
-
Можете закрыть редактор реестра.[1]
Реклама
Советы
- Прежде чем начать, вам нужно узнать их IP-адрес.
- Введите shutdown /? в Командную строку, чтобы увидеть полный список команд выключения.
Реклама
Предупреждения
- Эта статья преследует исключительно образовательные цели. Не злоупотребляйте этими знаниями.
Реклама
Об этой статье
Эту страницу просматривали 86 747 раз.
Была ли эта статья полезной?
Удаленный доступ к рабочему столу по протоколу RDP широко используется для работы не только с серверами, но и с рабочими станциями, как для удаленной работы, так и в целях администрирования. Однако есть некоторые ограничения, в частности в среде клиентской ОС нельзя управлять параметрами питания, даже имея права локального администратора. В некоторых случаях это способно взывать затруднения, поэтому если вы до сих пор не знаете, как выключить или перезагрузить клиентскую версию ОС через RDP — эта статья для вас.
Онлайн-курс по устройству компьютерных сетей
На углубленном курсе «Архитектура современных компьютерных сетей» вы с нуля научитесь работать с Wireshark и «под микроскопом» изучите работу сетевых протоколов. На протяжении курса надо будет выполнить более пятидесяти лабораторных работ в Wireshark.
В серверных системах семейства Windows локальный администратор, не говоря о доменном, имеет полный контроль над системой и не испытывает затруднений в управлении питанием даже подключившись через удаленный доступ.
В клиентских ОС ситуация принципиально иная, даже локальный администратор не имеет возможности выключить или перезагрузить компьютер.
Несмотря на кажущуюся нелогичность, определенный смысл в таком поведении есть. Серверные ОС администрируют профессионалы (как минимум в теории), которые должны отдавать себе отчет о возможных последствиях своих действий. С другой стороны, удаленно выключив ПК так просто включить его уже не получится, в большинстве случаев потребуется физическое присутствие, поэтому решение убрать подобную функцию от простых пользователей выглядит вполне обоснованно. Администраторы, следуя этой логике, должны уметь управлять питанием и иными способами.
Но как показывает практика, умеют это не все. Ничего страшного в этом нет, как говорил мой школьный учитель: спросить — стыд минуты, не знать — стыд всей жизни.
Графическая оболочка
На самом деле «проблема» решается не просто, а очень просто. Выйдя на рабочий стол достаточно нажать Alt+F4 чтобы получить стандартный диалог завершения работы.
Однако у этого способа есть один существенный недостаток. Очень часто выключить или перезагрузить компьютер мешают некоторые приложения, например, несохраненный документ. Подобная картина, на наш взгляд, знакома каждому.
Беда в том, что этого экрана через RDP вы уже не увидите. Да и открытые приложения — это полбеды, хуже, когда систему не дает выключить или перезагрузить зависшее приложение. В этом случае придется искать иные методы.
Командная строка
Как обычно, если графические инструменты не помогают, на помощь администратору приходит командная строка. Для того, чтобы управлять питанием компьютера с ее помощью не надо обладать особыми знаниями, достаточно запомнить одну простую команду. Нажмите Win+R или Пуск — Выполнить и введите следующие команды:
shutdown -s -f -t 0
для выключения
shutdown -r -f -t 0
для перезагрузки.
Разберем ключи команды подробнее:
- s — выключение компьютера
- r — перезагрузка
- f — принудительное завершение мешающих перезагрузке процессов
- t — время, через которое завершение работы будет выполнено, указывается в секундах через пробел. Если данный параметр не используется команда будет выполнена через 60 секунд.
Утилита PsShutdown от Sysinternals
Если штатные возможности вас по какой-либо причине не устраивают, то можно воспользоваться альтернативой — утилитой PsShutdown от Sysinternals. Разместите скачанный файл в любом удобном месте, лучше всего в одном из указанных в переменной PATH, либо добавьте туда ее расположение, это позволить запускать ее по короткому имени, без указания пути. Синтаксис утилиты похож на синтаксис стандартной, но есть некоторые отличия, так для выключения выполните:
psshutdown -k -f -t 0
а для перезагрузки:
psshutdown -r -f -t 0
Поясним используемые ключи:
- k — выключение системы
- r — перезагрузка
- f — принудительное завершение процессов
- t — время выполнения команды
Если вместо ключа -k использовать для выключения ключ -s, то система завершит работу без выключения питания, старожилы должны хорошо помнить:
Кроме того, данная утилита позволяет управлять питанием других ПК по сети. Если честно, то работать по сети умеет и штатная утилита shutdown, достаточно указать ключ:
-m \\computer
Но есть один существенный недостаток — команда выполняется в контексте запустившего его пользователя, поэтому вы из дома не сможете выключить рабочий ПК, даже имея доступ в корпоративную сеть через VPN и имея учетные данные администратора сети.
PsShutdown данного недостатка лишена и позволяет указывать учетные данные для подключения к удаленному ПК, например:
psshutdown \\computer -u username -p password -r -f -t 0
Данная команда выполнит перезагрузку удаленного ПК computer использовав для подключения имя username и пароль password. Следует помнить, что указанный вами пользователь должен иметь права доступа к административному ресурсу ADMIN$. В среде Active Directory этим правом обладает администратор домена, а вот в одноранговой сети могут возникнуть затруднения.
Если вы попробуете выключить удаленную систему даже с использованием учетных данных локального администратора, то скорее всего получите ошибку Отказано в доступе.
Это свидетельствует о том, что данный пользователь не имеет доступа к ресурсу ADMIN$. Чтобы его включить нужно выполнить два условия: включить общий доступ к файлам и принтерам
А затем в ветвь реестра
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
добавить параметр типа DWORD с именем
LocalAccountTokenFilterPolicy
и установить его значение равным 1. После этого компьютер потребуется перезагрузить.
Попробуем снова выключить его удаленно.
Как видим в этот раз команда отработала успешно.
PowerShell
Использовать PowerShell для выключения или перезагрузки компьютера, это сродни стрельбы из пушки по воробьям, но в ряде случаев может оказаться полезным.
Для выключения используйте команду:
Stop-Computer -Force
А для перезагрузки:
Restart-Computer -Force
Ключ -Force в данном случае аналогичен ключу -f команды shutdown и предполагает принудительное завершение работы мешающих выключению приложений.
Также PowerShell можно использовать для управления питанием по сети, например, можно выключить удаленный ПК командой:
Stop-Computer -ComputerName computer -Credential username -Force
Где ключи:
- ComputerName — имя удаленного компьютера, допускается перечисление нескольких имен через запятую
- Credential — имя учетной записи для аутентификации в удаленной системе
При этом работа через PowerShell более безопасна, так как пароль не вводится открытым текстом и не остается в истории команд. Для аутентификации используются стандартные механизмы ОС.
Как видим, для управления питанием в ОС Windows доступны самые разнообразные инструменты — на любой вкус и цвет. При этом все они доступны внутри терминальной сессии, какой из них использовать — дело личного вкуса и предпочтений.
Онлайн-курс по устройству компьютерных сетей
На углубленном курсе «Архитектура современных компьютерных сетей» вы с нуля научитесь работать с Wireshark и «под микроскопом» изучите работу сетевых протоколов. На протяжении курса надо будет выполнить более пятидесяти лабораторных работ в Wireshark.
