- Reboot Windows computer from command line (CMD)
- Command to reboot windows computer
- To shutdown a Windows computer
- To abort computer reboot
- To force reboot by closing applications without warning
- Add reason for the reboot of the computer
- Reboot windows using WMIC
- FIX: Windows 10 restarts randomly
- How do I fix random restarts in Windows 10?
- 1. Change Advanced Power Settings
- 2. Make sure the Sleep mode is enabled
- 3. Uninstall your antivirus
- 4. Update / uninstall your graphics card drivers
- 5. Change your power plan to High performance
- 6. Update your BIOS
- A little tech blog
- A woman driving along the I.T. road
- Reboot your Windows server at a specified time
- Option #1 Using Task Scheduler and a batch file
- Option #2 Use PSShutdown
- Windows reboot at time
- Question
Reboot Windows computer from command line (CMD)
We can reboot a Windows computer from command line using the in-built shutdown command.В Below you can find syntax of this command for various use cases. The below commands work on Windows 7, Windows 8, Windows 10 and all other server editions.
Command to reboot windows computer
The above command will set a time out of 30 seconds to close the applications. After 30 seconds, windows reboot will start.
If you want to reboot Windows with your own time out value you can use the below command.
To shutdown a Windows computer
To abort computer reboot
If you have issued a reboot command and have changed mind, you can stop Windows reboot by running the below command.
When you run this, you would see a pop up window at the right bottom part of the screen(near system tray) that shows the message “The scheduled shutdown has been cancelled”.
To force reboot by closing applications without warning
Open the shutdown GUI
Add reason for the reboot of the computer
Reboot Windows using WMIC commands:
Reboot windows using WMIC
You can run the below wmic command to reboot Windows OS.
Is the abort command supposed to work if one has issued the reboot from GUI. I have tried this on my Windows 7 Ultimate, it does not seem to be working. it says ‘no shutdown was in progress’
Abort works only when you had issued the reboot/shutdown using the command. GUI actions are not aborted by /a option.
I’ve just attempted all commands from Windows 7 Ultimate install disk (used as recovery disk) and I obviously have a fault with my disk trying to load the Windows installation volume, I’ve launched command prompt via shift F10 as the GUI was not responding or should I say it had a never ending hour glass, trying a force shut down resulted in ‘the function is unknown’ proceeded with some numerical digits inside of closed brackets?
Shutdown /a is very handy when windows update tries to force reboot your computer. You can run this command and cancel the reboot if you don’t want the reboot to happen at that time.
FIX: Windows 10 restarts randomly
- Restarting your PC can be an ideal solution for when you need to finalize software installations, or when you simply need to perform a clean boot of your system.
- Various software and hardware issues can cause your PC to restart on its own, which can severely hinder work productivity and gameplay experiences.
- Most restarts are caused by a failing hard drive, so maybe it is time that you upgrade yours to a better model that offers a lot of storage space.
- Since you’re using Windows 10 on a daily basis, don’t forget to check out our in-depth Windows 10 errors page.
- Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
- Click Start Scan to find Windows issues that could be causing PC problems.
- Click Repair All to fix issues affecting your computer’s security and performance
- Restoro has been downloaded by 0 readers this month.
Windows 10 is a stable operating system, but some users are having a different experience with it. According to them, the random restart occurs in Windows 10, and that can be quite inconvenient, so let’s see how to fix this issue.
Here are some more examples of this or similar issues:
- PC randomly restarts when playing games
- Windows 10 restarts automatically
- My Windows 10 random restart no BSOD
- Windows 10 restarts when idle
- Windows 10 random restart update
How do I fix random restarts in Windows 10?
Table of contents:
1. Change Advanced Power Settings
- Press Windows Key + S and type Power Options.
- From the list of results choose Power Options.
- When Power Options window opens, find your plan and click on Change plan settings.
- Now click on Change advanced power settings.
- Scroll down and locate Processor Power Management.
- You should see the Minimum Processor State value that is set to 100%.
- Change Minimum Processor State to some other value, such as 0.
- Save changes.
If you are having random restarts on Windows 10, you might want to try changing the power settings.
2. Make sure the Sleep mode is enabled
- Open Power Options, find your current plan and click on Change plan settings.
- After you’ve done that, find Put the computer to sleep option and choose any value except Never.
- Click Save changes and your problem should be fixed.
Sometimes random restart on Windows 10 can be triggered if Sleep mode timer is set to Never. In order to fix this issue, you need to set Sleep mode timer to any other different value.
3. Uninstall your antivirus
If you’re having random restarts, this can be caused by your antivirus software.
Users have reported that Kaspersky antivirus is sometimes the cause for a random restart on Windows 10, so if you’re using Kaspersky antivirus, you might want to temporarily uninstall it or upgrade it to a newer version.
If that doesn’t work, you might want to consider switching to different antivirus software.
We strongly recommend you Bitdefender as the world’s No. 1 Antivirus. It has a bunch of useful features that will keep your computer safe and optimized.
4. Update / uninstall your graphics card drivers
- Press Windows Key + X and choose Device Manager from the list.
- When Device Manager opens, locate your graphics card, right-click and choose Uninstall.
- Check Delete the driver software for this device and click OK.
- After the driver has been uninstalled, restart your computer.
- Download the latest driver from your graphics card manufacturer’s website and install it.
As you know, Windows 10 automatically installs its drivers, and if you install graphics card drivers from your graphics card manufacturer, you can sometimes cause conflicts and random restarts.
To fix this issue, you need to install additional drivers after Windows 10 performs its update and installs the necessary drivers first.
If you have already installed your graphics card drivers, you might need to uninstall them and install them again in order to fix this issue.
4.1 Update drivers automatically
If you try to install the drivers manually you risk to damage your system by downloading and installing the wrong version, thus we recommend using a dedicated tool.
This is a tedious process and we suggest to do it automatically by using Tweakbit’s Driver Updater tool.
This tool is approved by Microsoft and Norton Antivirus and uses an advanced updating technology. After several tests, our team concluded that this is the best-automatized solution.
Below you can find a quick guide on how to do it.
-
- Download and install TweakBit Driver Updater
- Once installed, the program will start scanning your PC for outdated drivers automatically. Driver Updater will check your installed driver versions against its cloud database of the latest versions and recommend proper updates. All you need to do is wait for the scan to complete.
- Upon scan completion, you get a report on all problem drivers found on your PC. Review the list and see if you want to update each driver individually or all at once. To update one driver at a time, click the ‘Update driver’ link next to the driver name. Or simply click the ‘Update all’ button at the bottom to automatically install all recommended updates.
Note:Some drivers need to be installed in multiple steps so you will have to hit the ‘Update’ button several times until all of its components are installed.
- Download and install TweakBit Driver Updater
Disclaimer: some features of this tool are not free.
5. Change your power plan to High performance
- Open Power Options.
- When Power Options window opens, choose High performance.
If you’re having random restarts on Windows 10, sometimes the best solution is to change your power plan to High performance.
We have to mention that by changing your mode to High performance your PC or laptop will consume more power, so keep that in mind.
This is especially important for laptop users because your battery will drain faster and you’ll have to recharge it more often.
6. Update your BIOS
Sometimes you can fix random restarts on Windows 10 by updating your BIOS. To update your BIOS, you need to visit your motherboard manufacturer’s website and download the latest version of BIOS.
Before you update BIOS, make sure that you check your motherboard’s manual in order to update BIOS properly.
If you’re not careful, you can cause permanent damage to your computer, so be careful if you decide to update your BIOS. If you don’t know how to do it properly, please contact an expert.
A little tech blog
A woman driving along the I.T. road
Reboot your Windows server at a specified time
We’ve all run up against a scenario where a newly installed application will not work properly unless you reboot the server. The problem with that is you are probably working on the app during business hours and a reboot is out of the question right now. There are 2 easy ways to schedule a reboot of your Windows server to happen during off hours with no late night RDP sessions required.
*disclaimer*
Please test these procedures on a test box before using them on your production server. Also, there are several ways to do this, just Google them and you’ll see what I mean. This was performed on Windows 2008 R2 SP1.
Option #1 Using Task Scheduler and a batch file
To prepare your server for a late night/early morning reboot, do the following:
Open notepad and enter the following:
@echo off
echo rebooting the server
ping yahoo.com
shutdown /r /f /d p:4:1 /c «Planned restart by Techmom»
I inserted the ping to slow down the command just a bit so I can test it abort the shutdown with a shutdown /a at a command line.
/r = restart
/f= force running apps closed without warning users
/d = Provide reason for restart
p:4:1= Planned:Major:Minor = Application: Maintenance (Planned)
/c = Comment on the reason of the restart or shutdown
This is what you’ll see in the event log regarding the reboot. The comment is a good place to make a note of why the reboot must occur.
Once you know it works, time to create a task.
Open Task Scheduler. In the Actions Panel, click create task. Click each tab and choose the options that will allow you to perform your reboot. My settings are as follows:
Trigger Tab, click New.
Action Tab, click new and browse to the batch script.
Conditions & Settings Tabs are with the default options selected.
Test the schedule to confirm the system will reboot.
If you are logged in during the test, you will see the warning popup informing you of the impending reboot.
Your server will reboot on the schedule you set. Review the event logs and the task scheduler library to confirm the reboot was successful.
Option #2 Use PSShutdown
PSShutdown is a Systernals utility that you can download from Microsoft to reboot local and remote machines. Follow the installation instructions before use.
This tool allows you to issue a psshutdown command from the command line, specify the reboot time as well as add parameters. To get a full list of the switches issue a PsShutdown /? at the prompt.
Open the command prompt and enter the command. In this example, I’ve chosen the following:
-f = Force apps close
-t = Time to start shutdown
Upon reboot, review the event log for more information on your reboot.
Windows reboot at time
Question
Over the years, my single biggest frustration as a Windows user has been the fact that Windows automatically restarts without my consent. This has been true of every version of Windows since ’98 as far as I can remember.
I understand it’s important to install updates and restart the computer so they can take affect, but restarting a computer without the user’s consent is like a police officer pulling someone over and beating them up with this baton because they didn’t put air in their tires when the light came on. It’s totally and utterly ridiculous, and I cannot understand why this completely unacceptable behavior continues to persist in this OS.
When Windows restarts automatically (without the users consent), work is almost always lost. I am a developer and have been using the tech preview on my dev machine. Several times over the past few weeks Windows has shown a popup saying it will restart in 15 minutes, at which point I begrudgingly saved and closed my work. Today, I walked away from my computer for about 20 minutes, and when I came back the computer had restarted automatically to install updates.
Problems this caused for me:
- I had a debugging session open in an IDE. All the work it had taken to get to that point, lost.
- I had a database management program open with all sorts of queries typed in, filters applied to tables, etc, all of which is lost when the program is closed
- I had scripts running that were doing important work, which is now totally screwed up because they were killed by the system
- I had unsaved snippets of code and other information stuck in a few notepad windows which is now gone
- I had several web browser windows open in which I was typing things like forum messages, all of which are now gone
- I can’t remember the rest, but I had a lot of other programs running which I now have to restart and reconfigure
So, I ask you, Microsoft, do you truly believe automatic restarts are in the user’s best interest? I can’t tell you how many times this has happened to me over the years, and this behavior makes me absolutely furious.