hey - thanks ...!
nice and working tip .
Dan.
Discussion on:
View:
Show:
And it was good to see all the switches and reason codes so nicely laid out. My only question is what determins a registered application to be restarted with the server? Surly if they are set to boot with the server, you would not need a switch in the shutdown command?
Nice list!! I just did that to my domain controller when I was having porblems rdp'ng to it. Of course I replicated before doing that so it does not affect the users. But it's nice to know this list - You can use the interface to shutdown/restart as many system as you need shutdown -i is a neat app!
Thanks for the post.
Thanks for the post.
I've been using this command since I started managing my servers and WinXP workstations via RDC - haven't really seen my servers since I put them in the rack last year. I've found that I have to put the FQDN in after the /m switch (have the canned syntax in a text file). Still works great!
This works as long as the RPC service on the remote target machine is still running properly.
Also, great tool when a user wants to get lippy.... -t 0 works wonders.
Also, great tool when a user wants to get lippy.... -t 0 works wonders.
This begs the question... if the system is so locked that CTRL+ALT+DELETE won't bring up its dialog, can I even reach a command line? Sadly, too many times the answer to this is "no". That being said, these situations are rare and far between now-a-days, and this is always a good thing to try anyways. Its ability to shutdown remote computers is also much appreciated.
J.Ja
J.Ja
Hey, I've been using command line restart for just over a year now. It works great! I do have one question...how to 'import' a list several computer names at one time?? I'd like to reboot or shutdown all my systems if necessary.
Create a batch file for this purposed!
All you have to do it have the command for each computer on a new line in notepad, you have to write out each command completely, then you have to click on File > Save As and then with the quotes type in "yourfilename.bat" and save it where you want, then all you have to do is double click on it and it will run. If you need more information on how a batch file works, Google it, just type in "batch commands" in Google and you can figure it out from there.
All you have to do it have the command for each computer on a new line in notepad, you have to write out each command completely, then you have to click on File > Save As and then with the quotes type in "yourfilename.bat" and save it where you want, then all you have to do is double click on it and it will run. If you need more information on how a batch file works, Google it, just type in "batch commands" in Google and you can figure it out from there.
Create a Scheduled Task with "C:\WINDOWS\system32\shutdown.exe -r -f -t 01" in the Run Command. Make it restart weekly just to "refresh" now and then anyway, to minimize server lock ups in the first place. If you ever lose control of your Task Manager anyway, just go to your Scheduled Task and run it to reboot.
ROFL - as administering some Linux-servers I did not even thought about of rebooting prophylactically. Crazy Windows-world
It's got one line: at \\%1 %2 shutdown -r -t 0 -f
When I want to schedule a restart of a machine I go to a command prompt and type "sd (the name of the batch file) machine time"!
When I want to schedule a restart of a machine I go to a command prompt and type "sd (the name of the batch file) machine time"!
Something is wrong with the document - the tables regarding the command line parameters and reason codes don't print.
I have also used these commands as icons on my desktop, i.e. a restart and a shutdown icon. This saves you from going to start etc. As for the actuall icons I found some good ones in shell32.dll.
In a tangent to this, I also have a lock screen icon with the following command:
%windir%\system32\rundll32.exe user32.dll,LockWorkStation and use a icon with a key from shell32.dll.
BTW I am using XP.
Hope someone finds this useful,
John
In a tangent to this, I also have a lock screen icon with the following command:
%windir%\system32\rundll32.exe user32.dll,LockWorkStation and use a icon with a key from shell32.dll.
BTW I am using XP.
Hope someone finds this useful,
John
Well, not really but Windows 98 did allow you to warm boot the OS without rebooting the hardware. This is waht you do:
1.)Click the start button and proceed to bring up the shutdown menu.
2.) Click the restart toggle option.
3.) Finally, hold down the shift key and immediately release it once you click the "OK" button.
Windows 98 will do a warm-boot instead of fully going down. As much as I like issuing commands from the command-line in XP/Server 2003; I do miss this ability from Win98.
P.S. You can't do this in Win2K either.
1.)Click the start button and proceed to bring up the shutdown menu.
2.) Click the restart toggle option.
3.) Finally, hold down the shift key and immediately release it once you click the "OK" button.
Windows 98 will do a warm-boot instead of fully going down. As much as I like issuing commands from the command-line in XP/Server 2003; I do miss this ability from Win98.
P.S. You can't do this in Win2K either.
Except for reason codes, the shutdown command has been around since NT. I could remote in to reboot any of those servers as needed.
It's a handy command to save a trip in just to poke a button. Still had to do that on occasion...
It's a handy command to save a trip in just to poke a button. Still had to do that on occasion...
I've been using Shutdown also since the NT days, but I'm one of those types who likes to keep handy little tables like this around for quick reference (is it me, or does command-line help still suck after nearly 30 years of DOS? Oh well, better than the help in Cisco IOS I guess).
Works with XP, but you need to use a - instead of a / for the switch
I am not completely sure, but I think every Win Version from XP on that use the Shutdown command needs to have the "-" instead of the "/" for the switches to work.
I am not sure why then the help for the command still has "/" in it, that is Microsoft for ya, even the simple things are screwy.
I have tested this in XP (All), 2003, Vista & 2000 Pro (I downloaded it to 2000 Pro). I think the server editions of 2000 already have it. I am not sure. Have not used 2000 Servers in a while now, and I do not recall if I had to download it for them also.
I am not sure why then the help for the command still has "/" in it, that is Microsoft for ya, even the simple things are screwy.
I have tested this in XP (All), 2003, Vista & 2000 Pro (I downloaded it to 2000 Pro). I think the server editions of 2000 already have it. I am not sure. Have not used 2000 Servers in a while now, and I do not recall if I had to download it for them also.
Sorry - shoot me down if you want, but if any sys-admin worth his salt doesn't already know this should be looking for a career change.
If you're a server admin and this is the first time you've heard of this utility you need to go choose another profession. I've been using this utility for over ten years now...
Just in case anyone else tried to print this... the text prints (I tried both paper and PDF) but not the tables. Cut and paste time... whee!
If you are going to be shutting down any system processes in Task Manager to track down a potential problem (like svchost for instance), it's handy to have a command-line window already up with "shutdown /a" at the ready... that way, if you accidentally terminate a task that results in the automated "The system will restart in 15 seconds" message, you can simply abort it and often just restart the process without any downtime.
I found this useful when I ran across a virus a few years ago that renamed itself svchost.exe and ran as a process... since there are often half a dozen svchost.exe's listed, it was easy to kill the real one (and thus initiate an automatic shutdown) by mistake. (And happy ending... when I finally killed the bug-version, it allowed me to kill the entire virus without having to shutdown the server).
I found this useful when I ran across a virus a few years ago that renamed itself svchost.exe and ran as a process... since there are often half a dozen svchost.exe's listed, it was easy to kill the real one (and thus initiate an automatic shutdown) by mistake. (And happy ending... when I finally killed the bug-version, it allowed me to kill the entire virus without having to shutdown the server).
The tool PSSHUTDOWN also an exe works a lot better than the built in shutdown exe. It is actually reliable which shutdown exe is not.
How to restart server when the server get hang and keyboard and mouse got hang .I had clicked ALT+CTRL+DEL but no response .Is there any command to restart
The command is "shutdown -r" from the command line. But if your mouse & keyboard are also hung, how are you going to enter a command? If you computer is that hung, you need to power it off completely.
J.Ja
J.Ja
Great to have in an east-to-use table. I can't count the number of times I have had to ask a co-worker: "Hey, what switch do I use to ..." when doing a remote restart of a client computer.
It may be old, but it's sure handy!
It may be old, but it's sure handy!
When you enter the command line from any workstation on the domain,type shutdown.exe -i This brings up a GUI for the remote shutdown, and you can do a "browse" for other machines on the domain.
You can also choose from several "reasons" for shutdown, and add your own comments.
I do have a bacth file for shutdown.exe -i, and made my own icon in MS Paint as a lightning bolt. This will also find any server or machine in the Active directory on the domain.
You can also choose from several "reasons" for shutdown, and add your own comments.
I do have a bacth file for shutdown.exe -i, and made my own icon in MS Paint as a lightning bolt. This will also find any server or machine in the Active directory on the domain.
THANK YOU! I'm working remote 2states away and needed this thing to restart. I've never run into this issue before. saved me.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle

































