Windows reboot to safemode from command prompt

Solution 1:

In Windows Vista and later, the command

 bcdedit /set safeboot Minimal

will enable safe mode (of course you must run this from an administrative command prompt) and the command

 bcdedit /deletevalue safeboot

will turn it off again.

Solution 2:

I'm not aware of a built-in command line method. You could in theory write one that sets the boot.ini flag and reboots the machine, though.