Skip to main content

Shutdown Command Via Command Prompt

The 'Shutdown' Command Becomes More Flexible and Automated when used from the Command Prompt.

To Run the 'Shutdown' command from the command prompt, go to 'Start > Run', type 'cmd', and press 'Enter'.
In the black box (the command prompt) type 'Shutdown' and the Switches you want to use with the 'Shutdown' command.
You have to use at least one switch for the shutdown command to work.

The Switches :-
The 'Shutdown' command has a few options called Switches. You can always see them by typing 'shutdown -?' in the command prompt if you forget any of them.

-i: Display GUI interface, must be the first option
-l: Log off (cannot be used with -m option)
-s: Shutdown the computer
-r: Shutdown and restart the computer
-a: Abort a system shutdown
-m \\computernameRemote computer to shutdown/restart/abort
-t xx: Set timeout for shutdown to xx seconds
-c “comment”: Shutdown comment (maximum of 127 characters)
-fForces running applications to close without warning
-d [u][p]:xx:yy: The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer less than 256) yy is the minor reason code (positive integer less than 65536)

Note :- I’ve noticed using a switch with a '-' sign doesn’t work sometimes.
If you are having trouble try using a '/' in place of '-' in your switches.

Examples :-
shutdown –m \\computername –r –f
This command will restart the computer named computername and force any programs that might still be running to stop.

shutdown –m \\computername –r –f –c “I’m restarting your computer. Please save your work now.” –t 120
This command will restart the computer named computername, force any programs that might still be running to stop, give to user on that computer amessage, and countdown 120 seconds before it restarts.

shutdown –m \\computername –a
This command will abort a previous shutdown command that is in progress.

Using A Batch File :-
You can create a file that performs the shutdown command on many computers at one time.

In this example I’m going to create a batch file that will use the shutdown command to shut down 3 computers on my home network before I go to bed.

Open 'Notepad' and type the shutdown command to shut down a computer for each computer on the network.
Make sure each shutdown command is on its own line.
An example of what should be typed in notepad is given below-

shutdown –m \\computer1 –s
shutdown –m \\computer2 –s
shutdown –m \\computer3 -s

Now I’ll save it as a batch file by going to file, save as, change save as type to all files, give the file a name ending with '.bat'. I named mine 'shutdown.bat'.
Pick the location to save the batch file in and save it.

When you run the batch file it’ll shutdown computer 1, 2, and 3 for you.

You can use any combination of shutdown commands in a batch file.



LIKE,COMMENT AND SHARE MY THIS ARTICLE 

AND BE A FAN OF THIS BLOG.

Like us on facebook Just click here.

Comments

Popular posts from this blog

Edit tiles in Windows 8

If you’ve recently installed or upgraded to Windows 8 and have started customizing programs onto its new Start Menu UI, you’ll notice that the program icons are the same old icons placed in an oversized box. You’ll see the program name under it and will be in awe at  how out of place the newly added icons are with the rest   of the Windows 8 theme. We’ve found a handy program to spruce things up by  creating awesome-looking tiles that match the look of Windows 8 apps  on the Start Menu, something like what you see below. And you can get that look using   OblyTile . First thing’s first, the icons you see above are works from users of deviantART. OblyTile only sets up your tiles; you have to provide the icons or images for the tile. But not to worry, we’ll provide you with  a few links which we’ve found to recreate the look and feel  of the screenshot you see above. Getting Started With OblyTile Run OblyTile (no insta...

STEALING PASSWORD WITH GOOGLE HACK

Google is a treasure trove full of important information, especially for  the underground  world. This Potential fact can also be utilized in the data for the username and password stored on a server. If the administrator save important data not in the  complete system authentifikasi folder, then most likely be reached by the google search engine. If data is successfully steal in by the unauthorized person, then the will be in misuse. Here, some google search syntax to crawl the password: 1.  "Login: *" "password =*" filetype: xls  (searching data command to the system files that are stored in  Microsoft Excel ) 2.  allinurl: auth_user_file.txt  (to find files auth_user_file.txt containing password on server). 3.  filetype: xls inurl: "password.xls"  (looking for username and password in ms excel format). This command can change with admin.xls) 4.  intitle: login password  (get link to the  login ...

Need For Speed Shift 2 Unleashed - PC Games Download

Customize your cars Delivering Car Race Need For Tailors Car With Need For Speed Shift 2 Unleashed - PC Games Download, players' hands sweat and ache as they clutch onto the controller, their pulse races from the break-neck speeds experienced through the first-person cockpit view.in Need For Speed Shift 2 Unleashed - PC Games Download features an all-new rendering engine with a massive graphics overhaul that puts the player in the heart of the racing action. With an innovative helmet camera view simulating the physical experience of driving at 200mph, the thrilling experience of night racing and authentic degradation of tracks and cars, this is tomorrow's sim for today’s adrenaline fueled racer. The Other Need For Speed That must play : Need for Speed : Porche Need for Speed : Pro Street Need for Speed : The Run Need For Speed Shift 2 Unleashed Cover PC Games Download Need For Speed Shift 2 Unleashed - PC Games Download Genre: R...