Table of Contents
This tip is about the how to Shut Down Windows 10 Using Command Prompt. So read this free guide, How to Shut Down Windows 10 Using Command Prompt. If you have query related to same article you may contact us.
How to Shut Down Windows 10 Using Command Prompt – Guide
While you can exit, 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 allows you to do the same things from the command prompt.
It is also a more powerful tool because, in addition to the standard functions, the command line tool allows you to record the reason for the event, display personalized messages to the user. final and even shutting down and restarting remote equipment. available at all times. However, if you spend most of your time in the command prompt terminal, you need to write a script that includes restarting your computer, or you are making system changes, and you want to record a reason for the restart or shutdown event, it will usually come in handy.
In this Windows 10 guide, let’s show you how to use the shutdown.exe command-line tool to shut down and restart local and remote machines in a variety of ways.
How to Knife
How to turn off the computer with the shutdown command
To manually shut down the computer from the command prompt, follow these steps:
In the command, replace TIME with the second to wait before the device starts the shutdown process.
For example, this command shuts down the computer after five seconds:
shutdown / s / t 5
After completing the steps, the computer will run the shutdown process depending on the options specified.
Turn off specifying reason
To turn off the device recording for a specific reason, follow these steps:
For example, this command turns off the device, recording the reason “Operating System: Service pack (Planned)”:
off /s /t 1 /dp:2:16
You can also switch /s to the /r option if you want to specify a reason for the restart in the command. See how:
off /r /t 1 /dp:2:16
The above command will shut down the device, recording the reason “Operating System: Service pack (unplanned)”.
After completing the steps, the Windows 10 device will shut down and register the specified reason.
You can always view the shutdown logs in Event Viewer > Windows Logs > System and look for the “Information” event with the source User32 and with the “Event ID” of 1074.
Shutdown with custom dialog message
To shut down a computer showing a dialog message alerting the user of the action, follow these steps:
For example, this command displays “Updating XYZ Company Application” before shutting down the computer after one minute:
shutdown /s /t 60 /c “Updating the XYZ company application.”
You can also switch /s to the /r option if you want to display a reboot message in the command. See how:
shutdown /r /t 60 /c “Updating the XYZ company application.”
After completing the steps, Windows 10 will display the message “Updating XYZ Company App” to the user and shut down the computer after 60 seconds.
How to shut down the remote computer with the shutdown command
The shutdown command-line tool also allows you to remotely shut down or restart a device. However, the tool is limited and you will need to take a few extra steps to get it working.
Configure remote device
Per up the remote computer to allow remote command executions, follow these steps:
After completing the steps, the device will be open to remotely receive commands from authenticated users.
If you want to roll back the changes to improve device security, you can use the same instructions described above, but in step #3, make sure you run this command: reg add HKLMSoftwareMicrosoftwindowsCurrentVersionPolicies system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 0 /f.
Turn off the remote device
To use the command prompt to remotely shut down a computer, follow these steps:
For example, this command connects to Office-PC computer:
net use Office-PCipc$
For example, this command will notify the user and force restart the device named “Office-PC” by closing 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 no one is using the computer, you can send a command that immediately resets the device. Here’s an example:
shutdown /r /m Office-PC /t 0 /f
After completing the steps, the remote host will shut down as per the command setting.
If you want to disconnect from the IPC$ share, run the following command: “net use * /delete” (without quotes) and press Y to confirm. If you plan to use this command, you may need to remap previously connected network drives.
Final note
I hope you like the guide How to Shut Down Windows 10 Using Command Prompt. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.