How to Use Shutdown Command Tool on Windows 10

508
How to Use Shutdown Command Tool on Windows 10

Here we can see, “How to Use Shutdown Command Tool on Windows 10”

Although you can sign out, shut down, restart, or hibernate your computer from the Start menu or Lock screen in Windows 10, the system also contains the shutdown.exe program, which lets you accomplish the same things from Command Prompt.

It’s also a more powerful tool because, in addition to standard duties, the command-line tool allows you to record the reason for the event, display personalized messages to the end-user, and even shut down and restart remote equipment.

This utility is available at all times. However, if you spend most of your time in the Command Prompt terminal, need to write a script that includes restarting the computer, or perform system changes and want to record a reason for the restart or shutdown event, it will typically come in handy.

How to Turn Off Computer with Shutdown Command

Follow these instructions to manually shut down the machine using Command Prompt:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To gently shut off the device after one minute, use the following command and hit Enter:

shutdown /s

4. To shut down the device after a set amount of time, type the following command and press Enter:

shutdown /s /t TIME

To wait before the device starts the shutdown procedure, substitute TIME with the second in the command.

Also See:  Microsoft: SolarWinds hackers are back with new wave of phishing attacks

This command, for example, switches off the computer after five seconds:

shutdown /s /t 5

5. To shut down the computer without waiting or warning, type the following command and press Enter:

shutdown /p

6. To shut down, use the following command and hit Enter to force all programs to terminate without warning:

shutdown /s /f

Once you’ve completed the steps, the computer will shut down based on the options you’ve selected.

Shut down specifying reason

Follow these methods to stop the gadget from recording a specific reason:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To include a rationale for the shutdown, type the following command and hit Enter:

shutdown /s /d p:MAJOR-NUMBER:MINOR-NUMBER

Change the MAJOR-NUMBER:MINOR-NUMBER in the command to the numbers that describe the cause. For example, the shutdown /? command will show you all of the available major and minor reason numbers.

This command, for example, turns off the device and logs the “Operating System: Service pack (Planned)” reason:

shutdown /s /t 1 /d p:2:16

If you want to specify a reason for the restart in the command, you can replace the /s option with the /r option. Here’s how to do it:

shutdown /r /t 1 /d p:2:16

4. To turn off the computer, type the following command and press Enter, stating an unplanned reason:

shutdown /s /t 1 /d u:2:16

The device will be shut down because “Operating System: Service pack (Unplanned)” was recorded.

The Windows 10 device will shut down and log the stated reason when you finish the procedures.

You can always go to Event Viewer > Windows Logs > System and search for the “Information” event with the User32 source and the “Event ID” of 1074 in the shutdown logs.

Shut down with custom dialog message

Follow these procedures to shut down a computer that displays a dialogue message informing the user of the action:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To turn off the device that is displaying the custom dialogue message, type the following command and press Enter:

shutdown /s /t TIME /c "MESSAGE"

Replace TIME with the number of seconds until the computer shuts down, and MESSAGE with the specific text you wish to show the user in the command.

For example, before shutting down the computer after one minute, this command displays “Updating XYZ company app”:

shutdown /s /t 60 /c "Updating XYZ company app."

If you want to show a message for the restart in the command, you can swap the /s for the /r option. Here’s how to do it:

shutdown /r /t 60 /c "Updating XYZ company app."

After you finish the procedures, Windows 10 will show the user the “Updating XYZ corporate programme” and shut down the machine after 60 seconds.

How to Turn Off Remote Computer with Shutdown command

You can also use the shutdown command-line utility to remotely turn off or restart a device. The tool, though, is limited, and you’ll have to take some extra steps to get it to operate.

Configure remote device

Follow these steps to enable remote command execution on the remote computer:

Warning: If you don’t do it right, altering the Registry can cause irrevocable damage to your installation. Before you begin, make a complete backup of your computer.

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To disable User Account Control for remote executions, type the following command and press Enter:

reg add HKLM\Software\Microsoft\windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

After you’ve completed the procedures, the device will be ready to accept orders from authenticated users over the internet.

If you want to undo the changes made to improve device security, follow the same steps as before, but at step 3, be sure to run the following command: reg add HKLM\Software\Microsoft\windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 0 /f.

Shut down remote device

Follow these procedures to remotely shut down a machine using the Command Prompt:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To connect to the IPC$ share (or a null session connection), use the following command and press Enter:

net use \\REMOTE-PC\ipc$

Replace REMOTE-PC with the name or IP address of the remote machine in the command.

This command, for example, connects to the Office-PC computer:

net use \\Office-PC\ipc$

4. Press Enter after verifying the account name on the remote device.

5. Press Enter to confirm the account password.

6. To restart the remote computer, type the following command and press enter:

shutdown /r /m \\REMOTE-PC /t TIME /c "COMMENT" /f

Replace REMOTE-PC with the name or IP address of the remote computer, TIME with the number of seconds to wait before starting the shutdown procedure, and COMMENT with the custom dialogue you want to deliver to the user in the command.

This command, for example, will alert the user and force a restart of the device “Office-PC,” terminating all applications without warning after one minute:

shutdown /r /m \\Office-PC /t 60 /c "This PC will restart in one minute for maintenance." /f

If the computer is not in use, you can send a command to restart it immediately. Here’s an illustration:

shutdown /r /m \\Office-PC /t 0 /f

The remote host will power off according to the command configuration once you’ve completed the procedures.

Run the command “net use * /delete” (without quotation marks) to disconnect from the IPC$ share, then press Y to confirm. You may need to remap previously linked network drives if you plan to use this command.

How to Restart Computer with Shutdown Command

Follow these methods to restart a Windows 10 device using Command Prompt:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To restart the device, type the following command and press Enter:

shutdown /r

4. To restart the device after a set amount of time, type the following command and press Enter:

shutdown /r /t TIME

To wait before the device starts the restart procedure, substitute TIME with the second in the command.

This command, for example, restarts the machine after five seconds:

shutdown /r /t 5

5. To restart without waiting or warning, type the following command and press Enter:

shutdown /r /p

6. To shut down, use the following command and hit Enter to force all programs to terminate without warning:

shutdown /r /f

The machine will restart according to the choices you specified in the command when you complete the steps.

Also See:  How to: Fix Skype Auto Sign in Problems on Windows 10

How to Sign Out Session with Shutdown Command

The shutdown tool also has a sign-out option. However, it’s only for the local machine and can only sign out the current session. Other users or someone on a remote device cannot be logged off.

Follow these methods to log out a Windows 10 account using Command Prompt:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To sign out of the current account session, type the following command and press Enter:

shutdown /L

The current user session will be signed out once you complete the procedures.

How to Hibernate Computer with Shutdown Command

Follow these procedures to put the computer into hibernation mode with a command:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To hibernate the device, type the following command and hit Enter:

shutdown /h

The device will go into slumber once you’ve completed the tasks. However, this feature is only available on devices that support it.

How to Boot in Firmware Mode with Shutdown Command

The command-line program also has an option to start the machine in the Unified Extensible Firmware Interface (UEFI) or Basic Input Output System (BIOS) firmware without going through any additional procedures.

Follow these procedures to start the device in the UEFI or BIOS interface:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To restart the device within the firmware, type the following command and press Enter:

shutdown /r /fw

4. To shut down the computer and boot into the firmware during the next startup, type the following command and press Enter:

shutdown /s /fw

You can also use the /p option instead of the /s option to force the shutdown without warning by closing all running apps.

The computer will boot into the firmware interface once you’ve completed the procedures.

How to Access the Advanced Boot Options with Shutdown Command

The “Advanced boot options” experience is a Windows 10 environment that contains various tools for troubleshooting and fixing issues. Although you can access these tools using the Settings app or a USB flash drive, you can also do so with the single shutdown command.

Follow these procedures to start the machine in Advanced boot options:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To restart the device into the Advanced boot options experience, use the following command and press Enter:

shutdown /r /o

4. To shut down the machine and start the Advanced boot choices experience during the next startup, type the following command and press Enter:

shutdown /s /o

You can also use the /p option instead of the /s option to force the shutdown without warning by closing all running apps.

Following these instructions, the machine will boot into Advanced boot tools, giving you access to recovery tools to troubleshoot and fix the installation.

How to Abort Computer Power Off Operation with Shutdown Command

When using the time-out option on a remote computer, this option is only available. You can stop the computer from shutting down after a certain amount of time has passed.

Follow these actions to stop a shutdown:

  1. Start the program.
  2. Right-click the top result in the search for Command Prompt and choose Run as administrator.
  3. To stop the shutdown, type the following command and hit Enter:

shutdown /a /m \\REMOTE-PC

Replace REMOTE-PC with the name or IP address of the remote machine in the command.

This command, for example, aborts the shutdown action on the remote computer Office-PC:

shutdown /a /m \\Office-PC

It’s expected that you ran the shutdown command successfully, which means you went through the procedures to configure the local computer and remote devices to allow remote command execution (see above instructions).

This advice focuses on Windows 10, although the command-line tool has been around for a long time, so you may still use these steps if you’re on Windows 8.x. For Windows 7, Shutdown.exe is also available, although the options are limited. For example, starting with Windows 8, the /o and /hybrid commands are available.

Conclusion

I hope you found this information helpful. Please fill out the form below if you have any queries or comments.

User Questions:

  1. Can you tell me where the shutdown command is in Windows 10?

Right-click the Start Menu and select Properties. To open the Windows Command Prompt, select Windows PowerShell. Next, enter shutdown /r to restart Windows. Stop-Computer and Restart-Computer are likewise available in PowerShell.

  1. How can I find shutdown EXE?

shutdown.exe (found in percent windir percent System32shutdown.exe) is a command-line shutdown application that can shut down the user’s computer or another machine on the user’s network.

  1. Does a factory reset get rid of viruses?

You will lose all of your information. This implies that all of your images, text messages, files, and saved settings will be deleted, and your device will be restored to its original form. A factory reset is an excellent trick. It does eradicate viruses and malware in certain cases, but not all of them.

Also See:  What to Do if Expired Domain Is Unavailable
  1. 4.Truth or myth? In Windows, “shutdown /r /t 0” doesn’t wait for services to be shut down gracefully?

Truth or myth? In Windows, "shutdown /r /t 0" doesn’t wait for services to be shut down gracefully? from sysadmin

  1. How to shut down another computer from my laptop?

How to shutdown another computer from my laptop? from techsupport