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

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 ...

Make your keyboard tinted everywhere

Ok guyz I Pawan Sharma going to share one awesome trick from which you can make your android keyboard fully tinted like your status bar or accordingly to the action bar(header). But but but this trick only works with rooted phones if you have a rooted phone then welcome to this post.After apply these methods surely your phone will rock on every screen. OK so things we need for this tricks are- 1.Rooted phone(android above then 4.3 jelly bean) 2.Super user installed 3.Xposed installer 4.Flat style keyboard 5.Gboard 1.Rooted Phone-If you do not have a rooted phone then dont worry you can root it easily there are many methods of rooting on internet,search your phone model on google for root method it will tell you how to root. There is one common app which root most probably all phones as i tested it on many phones that apk name is Kingroot You can download it from above link,just download it and connect internet open app click on root button.....wait until complete,this pro...

How to make a bootale Pen drive for window installation

Guyz this tutorial is for noobs who want to make a bootable pen drive for window installation or by any other purposes.Windows version does not matter for this method everyuser make his/her pd bootable.No third party tool is required to do this.It will take only 5 minutes to complete. So Let's Start- Search on your pc cmd and right click on it then click on run as administrator. After click on it you will get a black command window(Command Prompt) Now type diskpart and press enter. After execution of previous command move forward to the next command that is list disk,so type list disk in the command prompt and press enter after it. In my case my pd is of 8gb so my disk is disk 2 so i type select disk 2 in command prompt. Now type command clean. Now type create partition primary. Now type select partition 1. Now type command active. Now go on My Computer and format your pd as fat32 format. ...