{"id":11118,"date":"2017-05-08T11:28:57","date_gmt":"2017-05-08T05:58:57","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=11118"},"modified":"2017-05-08T11:28:57","modified_gmt":"2017-05-08T05:58:57","slug":"shutdown-command-via-command-prompt","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/shutdown-command-via-command-prompt\/","title":{"rendered":"How to Shutdown Command via Command Prompt"},"content":{"rendered":"<p>Today we are going to discuss about <strong>How to Shutdown Command via Command Prompt \u2013 <\/strong>The command prompt command \u2018Shutdown\u2019 Becomes More Flexible and Automated.\u00a0Go to \u2018Start &gt; Run\u2019, type \u2018cmd\u2019, and press \u2018Enter\u2019 to open command prompt.\u00a0In the black box (the command prompt) type \u2018Shutdown\u2019 and the Switches you need to use with the \u2018Shutdown\u2019 command.\u00a0You have to use at least one switch for the shutdown command to work.<\/p>\n[ad type=&#8221;banner&#8221;]\n<h4 id=\"how-to-shutdown-command-via-command-prompt\"><span style=\"color: #993300;\"><strong>How to Shutdown Command via Command Prompt<\/strong><\/span><\/h4>\n<p><strong>The Switches :-<\/strong><br \/>\nThe \u2018Shutdown\u2019 command has a few options called Switches. You can always see them by typing \u2018shutdown -?\u2019 in the command prompt if you forget any of them.<\/p>\n<ul>\n<li>-i: Display GUI interface, must be the first option<\/li>\n<li>-l: Log off (cannot be used with -m option)<\/li>\n<li>-s: Shutdown the computer<\/li>\n<li>-r: Shutdown and restart the computer<\/li>\n<li>-a: Abort a system shutdown<\/li>\n<li>-m \\\\computername: Remote computer to shutdown\/restart\/abort<\/li>\n<li>-t xx: Set timeout for shutdown to xx seconds<\/li>\n<li>-c \u201ccomment\u201d: Shutdown comment (maximum of 127 characters)<\/li>\n<li>-f: Forces running applications to close without warning<\/li>\n<li>-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)<\/li>\n<\/ul>\n[ad type=&#8221;banner&#8221;]\n<p><strong>Note :-<\/strong> \u00a0Some time a \u2018-\u2018 sign doesn\u2019t work. If you are having trouble try using a \u2018\/\u2019 in place of \u2018-\u2018 in your switches.<\/p>\n<p><strong>Examples :-<\/strong><\/p>\n<p style=\"text-align: center;\"><code>shutdown \u2013m \\\\computername \u2013r \u2013f<\/code><\/p>\n<p>This command will restart the computer named computername and force any programs that might still be running to stop.<\/p>\n<p style=\"text-align: center;\"><code>shutdown \u2013m \\\\computername \u2013r \u2013f \u2013c \u201cI\u2019m restarting your computer. Please save your work now.\u201d \u2013t 120<\/code><\/p>\n<p>This command will restart the computer named computername, force any programs that might still be running to stop, give to user on that computer a message, and countdown 120 seconds before it restarts.<\/p>\n<p style=\"text-align: center;\"><code>shutdown \u2013m \\\\computername \u2013a<\/code><\/p>\n<p>This command will abort a previous shutdown command that is in progress.<\/p>\n<p><strong>Using A Batch File :-<\/strong><\/p>\n<p>You can create a file that performs the shutdown command on many computers at one time.<\/p>\n<p>In this example I\u2019m 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.<\/p>\n<p>Open \u2018Notepad\u2019 and type the shutdown command to shut down a computer for each computer on the network.<br \/>\nMake sure each shutdown command is on its own line.<br \/>\nAn example of what should be typed in notepad is given below-<\/p>\n<blockquote><p>shutdown \u2013m \\\\computer1 \u2013s<br \/>\nshutdown \u2013m \\\\computer2 \u2013s<br \/>\nshutdown \u2013m \\\\computer3 -s<\/p><\/blockquote>\n[ad type=&#8221;banner&#8221;]\n<p>Now I\u2019ll 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 \u2018.bat\u2019. I named mine \u2018shutdown.bat\u2019.<br \/>\nPick the location to save the batch file in and save it.<\/p>\n<p>When you run the batch file it\u2019ll shutdown computer 1, 2, and 3 for you.<\/p>\n<p><strong>How To Shutdown Command Via Command Prompt.\u00a0<\/strong>You can use any combination of shutdown commands in a batch file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Shutdown Command via Command Prompt &#8211; PC &#8211; The black box (the command prompt) type \u2018Shutdown\u2019 and the Switches you need to use with the \u2018Shutdown\u2019.<\/p>\n","protected":false},"author":2,"featured_media":11693,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29859,5739],"tags":[34124,34122,34091,34118,34112,34136,34130,34137,34126,34127,34141,34121,34109,34144,34139,34140,34146,34134,34088,34092,34113,34116,34114,34142,34133,34131,34149,34093,34132,34138,34129,34148,34135,34111,34147,34089,34100,34103,34119,34102,34101,34098,34099,34117,34095,34105,34094,34115,34107,34143,34128,34120,34123,34125,34104,34096,34108,34110,34145,34090,34097,34106],"class_list":["post-11118","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hacking","category-pc","tag-batch-shutdown-command","tag-cancel-shutdown-command","tag-cmd-shutdown-command","tag-cmd-shutdown-command-timer","tag-cmd-shutdown-commands","tag-command-prompt-reboot","tag-command-prompt-restart","tag-command-prompt-restart-computer","tag-command-prompt-shutdown","tag-command-prompt-shutdown-timer","tag-command-prompt-to-restart","tag-dos-shutdown-command","tag-force-shutdown-command","tag-how-to-reboot-from-command-prompt","tag-how-to-restart-from-command-prompt","tag-how-to-restart-windows-from-command-prompt","tag-how-to-shutdown-another-computer-using-cmd-ip-address","tag-how-to-shutdown-another-computer-using-command-prompt","tag-how-to-shutdown-command-via-command-prompt","tag-linux-shutdown-command","tag-linux-shutdown-command-line","tag-no-shutdown-command","tag-pc-shutdown-command","tag-reboot-command-prompt","tag-reboot-from-command-prompt","tag-remote-command-prompt","tag-remote-restart-command","tag-remote-shutdown-command","tag-restart-command-prompt","tag-restart-computer-from-command-prompt","tag-restart-from-command-prompt","tag-restart-from-command-prompt-windows-10","tag-restart-windows-from-command-prompt","tag-run-shutdown-command","tag-shutdown-r-t-0","tag-shutdown-command","tag-shutdown-command-cmd","tag-shutdown-command-in-cmd","tag-shutdown-command-in-linux","tag-shutdown-command-in-windows","tag-shutdown-command-line","tag-shutdown-command-linux","tag-shutdown-command-prompt","tag-shutdown-command-timer","tag-shutdown-command-windows","tag-shutdown-command-windows-10","tag-shutdown-command-windows-7","tag-shutdown-command-windows-7-timer","tag-shutdown-command-windows-8","tag-shutdown-from-command-prompt","tag-shutdown-using-command-prompt","tag-ubuntu-shutdown-command-line","tag-unix-shutdown-command","tag-win7-shutdown-command","tag-windows-10-shutdown-command","tag-windows-7-shutdown-command","tag-windows-7-shutdown-command-line","tag-windows-8-shutdown-command","tag-windows-command-prompt-restart","tag-windows-shutdown-command","tag-windows-shutdown-command-line","tag-windows-xp-shutdown-command"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/11118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=11118"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/11118\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media\/11693"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=11118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=11118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=11118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}