Reboot from the Windows command prompt. All possible options

 

Well-known system administrators around the world prefer to use the command line. The psychological reason is to feel superior to the average user, no matter how commonplace. But there is a real need - the command line gives much greater flexibility in managing the system.

It would seem that this statement applies only to Linux systems, where command line management is the most developed and traditional way. But this is a stereotype. After all, NT-based Windows has almost the same administrative tools as Unix, only the commands are called a little differently. For example, if rebooting from the command line on Linux can be done by a simple reboot, then on Windows you need to type commands with parameters.

"" ! – shutdown.exe. – shutdown -r -t 0. . , , shutdown "-?", . , shutdown.exe -r -t 60 –c. 60 , . , – 127 .





"-f", , . , , . – shutdown -a, .

, , , , Unix-. – Linux. , Windows : ping -n seconds 127.0.0.1>nul&wmic OS WHERE Primary="TRUE" CALL Win32Shutdown 6.

, , nul. , -n seconds , .

Windows – rundll32.exe, . . , . : undll32 user.exe,ExitWindowsExec 2.

rundll32, .

: undll32 msgina,ShellShutdownDialog. : RUNDLL.EXE user.exe,ExitWindows.

, , XP SP2. (|), Unix: echo y|net stop eventlog.

: , , .

. Visual Basic (VBS), Microsoft . , psshutdown Ps Tools, , , shutdown. : psshutdown -r -f -t 30. 30 .

, , , psshutdown -r comp1, comp1 – , . . psshutdown -m. – tsshutdn.

You may not need all of these methods, but for those who are often confronted with the administration of a Windows-based PC, it’s very useful to know them.

 




All Articles