If you’re like me then you have a good reason to have both a lab and a personal machine. I have a server in my home that is both a Windows Server 2016 and Windows 10 Pro. Both operating systems are accessible through dual boot. My default is the Windows Server 2016.
What if I’m using my Windows 10 Pro OS remotely, and the server reboots? This can happen because of a power failure or one of Microsoft’s super annoying forced upgrades. Well, because of the default, the server will boot back to Windows Server 2016, not Windows 10 Pro.
There is a way to use command line to reboot the machine back into the OS of your choosing. I found a really great article here on howtogeek. They suggest creating a shortcut but I’ve always felt more comfortable just running the command line, or just creating a batch file.
- Run bcdedit
- Get the ID of the OS that you want to reboot into
- Change the boot sequence of your machine
- C:\Windows\System32\bcdedit /bootsequence <IDGOESHERE> /addfirst
- Reboot your machine
I did see some weird things happen like my remote machine not booting up within a reasonable amount of time, but a force reboot always was able to bring up the correct OS.