4 Ways to Shut Down or Restart Another Computer Via CMD

Table of contents:

4 Ways to Shut Down or Restart Another Computer Via CMD
4 Ways to Shut Down or Restart Another Computer Via CMD

Video: 4 Ways to Shut Down or Restart Another Computer Via CMD

Video: 4 Ways to Shut Down or Restart Another Computer Via CMD
Video: How to change date & time of your system using command prompt 2024, April
Anonim

Command Prompt (CMD) is a feature in Windows that serves as a medium or entry point for typing MS-DOS (Microsoft Disk Operating System) commands and other computer commands. You can use the Command Prompt to remotely shut down or restart another computer. In order to do this, you must have administrator access to the target computer. In addition, the file and printer sharing feature must be enabled on the computer.

Step

Method 1 of 4: Using CMD

Shut Down or Restart Another Computer Using CMD Step 1
Shut Down or Restart Another Computer Using CMD Step 1

Step 1. Click the “Start” button

Windowsstart
Windowsstart

This button is indicated by the Windows icon in the lower-left corner of the screen.

Shut Down or Restart Another Computer Using CMD Step 2
Shut Down or Restart Another Computer Using CMD Step 2

Step 2. Type cmd

The Command Prompt feature will be searched for and displayed at the top of the Windows “Start” menu.

Shut Down or Restart Another Computer Using CMD Step 3
Shut Down or Restart Another Computer Using CMD Step 3

Step 3. Right-click Command Prompt

This option is indicated by a black screen icon with a white command line. Right-click the icon to display the menu to the right of the icon.

Shut Down or Restart Another Computer Using CMD Step 4
Shut Down or Restart Another Computer Using CMD Step 4

Step 4. Click Run as administrator

Command Prompt will be run with administrator rights.

You must be logged into an administrator account on the computer in order to run Command Prompt as an administrator

Shut Down or Restart Another Computer Using CMD Step 5
Shut Down or Restart Another Computer Using CMD Step 5

Step 5. Type shutdown into the Command Prompt window

This is the first line of the command to shut down the computer.

To see a complete list of shutdown commands, type shutdown /? in the Command Prompt window

Shut Down or Restart Another Computer Using CMD Step 6
Shut Down or Restart Another Computer Using CMD Step 6

Step 6. Type m \computername

Enter this entry one space after the word "shutdown" on the same line. Replace "computername" with the name of the target computer.

Shut Down or Restart Another Computer Using CMD Step 7
Shut Down or Restart Another Computer Using CMD Step 7

Step 7. Type /s or /r, one space after the computer name

If you want to shut down the target computer, type "/s", one space after the computer name. To restart the computer, type "/r", one space after the computer name.

Shut Down or Restart Another Computer Using CMD Step 8
Shut Down or Restart Another Computer Using CMD Step 8

Step 8. Type /f

Insert a space after "/s" or "/r" and enter the entry. This entry serves to force close all programs on the target computer remotely.

  • Notes:

    Users can lose unsaved work if the program is forced to close. Move on to the next step to learn how to warn the user and give them a few seconds to save their work before shutting down or restarting the computer.

  • Up to this point, the overall command entered should look like this: shutdown \workspace1 /r /f. Press Enter to restart the computer. Proceed to the next step to add a timer and a comment or message.
Shut Down or Restart Another Computer Using CMD Step 9
Shut Down or Restart Another Computer Using CMD Step 9

Step 9. Type /c

Insert a space after "/f" and enter the entry on the same line. With this entry, you can send messages to the target computer.

Shut Down or Restart Another Computer Using CMD Step 10
Shut Down or Restart Another Computer Using CMD Step 10

Step 10. Enter the message and enclose it with quotes

Insert a space after "/c" and type your message. This message serves to warn the target computer user that the computer will be shut down. For example, you could type, “This computer will restart. Please save all your work.” Make sure the message is enclosed in quotes (" ").

Shut Down or Restart Another Computer Using CMD Step 11
Shut Down or Restart Another Computer Using CMD Step 11

Step 11. Type /t, followed by the countdown duration (in seconds)

This entry is entered one space after the entry in the previous step. With this entry, you can give the user a few seconds to save their work before the computer shuts down. For example, you could type /t 60 to give the user 60 seconds to save their work before the computer shuts down or restarts.

Shut Down or Restart Another Computer Using CMD Step 12
Shut Down or Restart Another Computer Using CMD Step 12

Step 12. Press Enter key

The command will be executed. At this point, your overall command should look like this: shutdown m\workspace1 /r /f /c " This computer will restart. Please save all your work." /t 60.

  • If you receive the message " Access Denied ”, make sure you are logged into an administrator account and have administrator access to the target computer. Read the third method to find out how to enable file and printer sharing on both computers and set it up to bypass Windows firewalls.
  • If you can't connect to the target computer's registry, read the fourth method to find out how to edit the registry on that computer.

Method 2 of 4: Using the Remote Shutdown Dialog Window

Shut Down or Restart Another Computer Using CMD Step 13
Shut Down or Restart Another Computer Using CMD Step 13

Step 1. Click the “Start” button

Windowsstart
Windowsstart

This button is indicated by the Windows icon in the lower-left corner of the screen.

Shut Down or Restart Another Computer Using CMD Step 14
Shut Down or Restart Another Computer Using CMD Step 14

Step 2. Type cmd

The Command Prompt feature/program will be searched for on the computer and displayed at the top of the Windows “Start” menu.

Shut Down or Restart Another Computer Using CMD Step 15
Shut Down or Restart Another Computer Using CMD Step 15

Step 3. Right-click Command Prompt

This option is indicated by a black screen icon with a white command line. Right-click the icon to display the menu to the right of the icon.

Shut Down or Restart Another Computer Using CMD Step 16
Shut Down or Restart Another Computer Using CMD Step 16

Step 4. Click Run as administrator

Command Prompt will be run with administrator rights.

You must be logged into an administrator account on the computer in order to run Command Prompt as an administrator

Shut Down or Restart Another Computer Using CMD Step 17
Shut Down or Restart Another Computer Using CMD Step 17

Step 5. Type shutdown -i and press Enter key

The “Remote Shutdown Dialog” window will be displayed.

Shut Down or Restart Another Computer Using CMD Step 18
Shut Down or Restart Another Computer Using CMD Step 18

Step 6. Click Add

It's to the right of the "Computers" box.

Shut Down or Restart Another Computer Using CMD Step 19
Shut Down or Restart Another Computer Using CMD Step 19

Step 7. Type in the IP address of the target computer and click Ok

The target computer is the one you need to shut down or restart. Enter the IP address of the computer in the "Add Computers" window, then click " Ok ”.

If you don't know the private IP address of the target computer, you can find out the address through the target computer directly

Shut Down or Restart Another Computer Using CMD Step 20
Shut Down or Restart Another Computer Using CMD Step 20

Step 8. Decide whether you want to shut down or restart the computer

Use the drop-down menu under " What do you want these computers to do " to select " Shutdown " (if you want to shut down the computer) or " Restart " (if the computer needs to be restarted).

Shut Down or Restart Another Computer Using CMD Step 21
Shut Down or Restart Another Computer Using CMD Step 21

Step 9. Click the checkbox

Windows10regchecked
Windows10regchecked

next to "Warn users of action" (optional).

With this option, you can set a timer until the computer shuts down.

Shut Down or Restart Another Computer Using CMD Step 22
Shut Down or Restart Another Computer Using CMD Step 22

Step 10. Type in the duration of the timer (in seconds) until the computer shuts down (optional)

Enter a number in the column with the sentence " Display warning for seconds ". The timer will be activated until the target computer is turned off.

Shut Down or Restart Another Computer Using CMD Step 23
Shut Down or Restart Another Computer Using CMD Step 23

Step 11. Click the checkbox

Windows10regchecked
Windows10regchecked

next to "Planned" (optional).

With this option, you can log or record any time the computer is shut down or restarted remotely.

Shut Down or Restart Another Computer Using CMD Step 24
Shut Down or Restart Another Computer Using CMD Step 24

Step 12. Select the reason for shutting down the computer (optional)

Use the drop-down menu under " Options " to determine the best reason for shutting down/restarting the computer. For example, you can select " Hardware: Maintenance (Planned) ".

Shut Down or Restart Another Computer Using CMD Step 25
Shut Down or Restart Another Computer Using CMD Step 25

Step 13. Type in a comment (optional)

The comments will be displayed on the target computer. For example, you could type a message such as “The computer will shut down in 60 seconds. Please save all your work."

Shut Down or Restart Another Computer Using CMD Step 26
Shut Down or Restart Another Computer Using CMD Step 26

Step 14. Click Ok

The command to shut down or restart the computer will be executed.

  • If you receive the message " Access Denied ”, make sure you are logged in to an administrator account and have administrator access to the target computer. Read the third method to find out how to enable file and printer sharing on both computers and set it up to bypass Windows firewalls.
  • If you can't connect to the target computer's registry, read the fourth method to find out how to edit the registry on that computer.

Method 3 of 4: Setting the Printer and File Sharing Feature to Pass Windows Firewall

Shut Down or Restart Another Computer Using CMD Step 27
Shut Down or Restart Another Computer Using CMD Step 27

Step 1. Open Control Panel

Follow these steps to open the Control Panel.

  • Click the Windows “Start” menu.
  • Type in Control Panel.
  • Click " Control Panel ”.
Shut Down or Restart Another Computer Using CMD Step 28
Shut Down or Restart Another Computer Using CMD Step 28

Step 2. Click Network and Internet

This green text is next to the icon of two computer screens in front of a globe.

Skip the next step if you don't see this option,

Shut Down or Restart Another Computer Using CMD Step 29
Shut Down or Restart Another Computer Using CMD Step 29

Step 3. Click Network and Sharing Center

It's next to the icon for four connected computers.

Shut Down or Restart Another Computer Using CMD Step 30
Shut Down or Restart Another Computer Using CMD Step 30

Step 4. Click Change advanced sharing settings

It's in the bottom-left sidebar of the window.

Shut Down or Restart Another Computer Using CMD Step 31
Shut Down or Restart Another Computer Using CMD Step 31

Step 5. Click the circle button next to Turn on network discovery

The network detection feature will be activated.

Shut Down or Restart Another Computer Using CMD Step 32
Shut Down or Restart Another Computer Using CMD Step 32

Step 6. Click the radio button next to the Turn on file and printer sharing option

The file and printer sharing feature will be activated after that.

Shut Down or Restart Another Computer Using CMD Step 33
Shut Down or Restart Another Computer Using CMD Step 33

Step 7. Click Save Changes

It's in the lower-right corner of the window.

Shut Down or Restart Another Computer Using CMD Step 34
Shut Down or Restart Another Computer Using CMD Step 34

Step 8. Click Network and Internet

It's in the address bar at the top of the Control Panel window. You will be taken back to the “Network and Internet” menu in the Control Panel.

Shut Down or Restart Another Computer Using CMD Step 35
Shut Down or Restart Another Computer Using CMD Step 35

Step 9. Click System and Security

This option is in the left sidebar menu of the Control Panel window.

Shut Down or Restart Another Computer Using CMD Step 36
Shut Down or Restart Another Computer Using CMD Step 36

Step 10. Click Allow an app through Windows Firewall

This option is the second option under "Windows Defender Firewall".

Shut Down or Restart Another Computer Using CMD Step 37
Shut Down or Restart Another Computer Using CMD Step 37

Step 11. Click the checkbox

Windows10regchecked
Windows10regchecked

next to "File and Printer Sharing".

This option is in the list of allowed apps and features.

Shut Down or Restart Another Computer Using CMD Step 38
Shut Down or Restart Another Computer Using CMD Step 38

Step 12. Click the checkbox

Windows10regchecked
Windows10regchecked

under "Private".

This box is to the right of the "File and Printer Sharing" option in the list of allowed apps and features.

Shut Down or Restart Another Computer Using CMD Step 39
Shut Down or Restart Another Computer Using CMD Step 39

Step 13. Click Ok

It's at the bottom of the Control Panel window. Changes made will be saved and applied to the computer.

Method 4 of 4: Editing the Registry

Shut Down or Restart Another Computer Using CMD Step 40
Shut Down or Restart Another Computer Using CMD Step 40

Step 1. Click the “Start” button

Windowsstart
Windowsstart

This button is indicated by the Windows icon in the lower-left corner of the screen. In newer versions of Windows, administrator rights are usually removed when you try to access another computer remotely. You can get around this limitation by editing the registry.

Shut Down or Restart Another Computer Using CMD Step 41
Shut Down or Restart Another Computer Using CMD Step 41

Step 2. Type regedit

The Registry Editor (regedit) application icon will be displayed.

  • Warning:

    Editing or deleting content in Registry Editor can cause permanent damage to the operating system. Consider these risks when following this step.

Shut Down or Restart Another Computer Using CMD Step 42
Shut Down or Restart Another Computer Using CMD Step 42

Step 3. Click Regedit

The Registry Editor application will open.

Shut Down or Restart Another Computer Using CMD Step 43
Shut Down or Restart Another Computer Using CMD Step 43

Step 4. Open the "System" folder in the "Policies" section

You can use the folder list on the left sidebar of the window to browse the folders/contents in the Registry Editor. Follow these steps to access the " System " folder in the " Policies " segment:

  • Double click the folder " HKEY_LOCAL_MACHINE ”.
  • Double click the folder " SOFTWARE ”.
  • Double click the folder " Microsoft ”.
  • Double click the folder " Windows ”.
  • Double click the folder " CurrentVersion ”.
  • Double click the folder " Policies ”.
  • Double click the folder " System ”.
Shut Down or Restart Another Computer Using CMD Step 44
Shut Down or Restart Another Computer Using CMD Step 44

Step 5. Create a new “DWORD” entry/value

Follow these steps to create a new “DWORD” value/entry in the “System” folder.

  • Right-click an empty space to the right of the folder in the window's sidebar.
  • Hover over the button " New ”.
  • Click DWORD (32-bit) Value.
Shut Down or Restart Another Computer Using CMD Step 45
Shut Down or Restart Another Computer Using CMD Step 45

Step 6. Name the new “DWORD” entry/value as “LocalAccountTokenFilterPolicy”

When creating a new “DWORD” entry, the name of the entry will be highlighted in blue. Type "LocalAccountTokenFilterPolicy" directly to rename the entry.

Shut Down or Restart Another Computer Using CMD Step 46
Shut Down or Restart Another Computer Using CMD Step 46

Step 7. Right click LocalAccountTokenFilterPolicy

A menu will appear to the right of the entry.

Shut Down or Restart Another Computer Using CMD Step 47
Shut Down or Restart Another Computer Using CMD Step 47

Step 8. Click Modify

The “DWORD” entry editing window will be displayed.

Shut Down or Restart Another Computer Using CMD Step 48
Shut Down or Restart Another Computer Using CMD Step 48

Step 9. Change the data value to "1"

Use the box under " value data " to change the value from "0" to "1".

Shut Down or Restart Another Computer Using CMD Step 49
Shut Down or Restart Another Computer Using CMD Step 49

Step 10. Click Ok

Changes to the “DWORD” entry will be saved. Now, you can close the Registry Editor window.

Tips

  • Before performing the steps in this article, you need to know the IP address of the target computer first.
  • Type shutdown /? in the Command Prompt window to see a complete list of commands to shut down the computer.

Recommended: