{"id":11049,"date":"2015-11-16T15:55:05","date_gmt":"2015-11-16T20:55:05","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=11049"},"modified":"2015-11-16T15:55:05","modified_gmt":"2015-11-16T20:55:05","slug":"windows-7-restart-command","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=11049","title":{"rendered":"Windows 7: Restart Command"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Examples\">Examples<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Syntax\">Syntax<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#References\">References<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Examples\"><h2>Examples<\/h2><\/span>\n<p>* Restart in 5 seconds with reasons being planned application maintenance:<\/p>\n<pre lang=\"bash\">\r\nshutdown \/r \/f \/t 5 \/c \"server reboot\" \/d p:4:1\r\n<\/pre>\n<span id=\"Syntax\"><h2>Syntax<\/h2><\/span>\n<pre lang=\"bash\">\r\nC:\\Windows\\system32>shutdown \/?\r\nUsage: shutdown [\/i | \/l | \/s | \/r | \/g | \/a | \/p | \/h | \/e] [\/f]\r\n    [\/m \\\\computer][\/t xxx][\/d [p|u:]xx:yy [\/c \"comment\"]]\r\n\r\n    No args    Display help. This is the same as typing \/?.\r\n    \/?         Display help. This is the same as not typing any options.\r\n    \/i         Display the graphical user interface (GUI).\r\n               This must be the first option.\r\n    \/l         Log off. This cannot be used with \/m or \/d options.\r\n    \/s         Shutdown the computer.\r\n    \/r         Shutdown and restart the computer.\r\n    \/g         Shutdown and restart the computer. After the system is\r\n               rebooted, restart any registered applications.\r\n    \/a         Abort a system shutdown.\r\n               This can only be used during the time-out period.\r\n    \/p         Turn off the local computer with no time-out or warning.\r\n               Can be used with \/d and \/f options.\r\n    \/h         Hibernate the local computer.\r\n               Can be used with the \/f option.\r\n    \/e         Document the reason for an unexpected shutdown of a computer.\r\n    \/m \\\\computer Specify the target computer.\r\n    \/t xxx     Set the time-out period before shutdown to xxx seconds.\r\n               The valid range is 0-315360000 (10 years), with a default of 30.\r\n               If the timeout period is greater than 0, the \/f parameter is\r\n               implied.\r\n    \/c \"comment\" Comment on the reason for the restart or shutdown.\r\n               Maximum of 512 characters allowed.\r\n    \/f         Force running applications to close without forewarning users.\r\n               The \/f parameter is implied when a value greater than 0 is\r\n               specified for the \/t parameter.\r\n    \/d [p|u:]xx:yy  Provide the reason for the restart or shutdown.\r\n               p indicates that the restart or shutdown is planned.\r\n               u indicates that the reason is user defined.\r\n               If neither p nor u is specified the restart or shutdown is\r\n               unplanned.\r\n               xx is the major reason number (positive integer less than 256).\r\n               yy is the minor reason number (positive integer less than 65536).\r\n\r\n\r\nReasons on this computer:\r\n(E = Expected U = Unexpected P = planned, C = customer defined)\r\nType    Major   Minor   Title\r\n\r\n U      0       0       Other (Unplanned)\r\nE       0       0       Other (Unplanned)\r\nE P     0       0       Other (Planned)\r\n U      0       5       Other Failure: System Unresponsive\r\nE       1       1       Hardware: Maintenance (Unplanned)\r\nE P     1       1       Hardware: Maintenance (Planned)\r\nE       1       2       Hardware: Installation (Unplanned)\r\nE P     1       2       Hardware: Installation (Planned)\r\nE       2       2       Operating System: Recovery (Planned)\r\nE P     2       2       Operating System: Recovery (Planned)\r\n  P     2       3       Operating System: Upgrade (Planned)\r\nE       2       4       Operating System: Reconfiguration (Unplanned)\r\nE P     2       4       Operating System: Reconfiguration (Planned)\r\n  P     2       16      Operating System: Service pack (Planned)\r\n        2       17      Operating System: Hot fix (Unplanned)\r\n  P     2       17      Operating System: Hot fix (Planned)\r\n        2       18      Operating System: Security fix (Unplanned)\r\n  P     2       18      Operating System: Security fix (Planned)\r\nE       4       1       Application: Maintenance (Unplanned)\r\nE P     4       1       Application: Maintenance (Planned)\r\nE P     4       2       Application: Installation (Planned)\r\nE       4       5       Application: Unresponsive\r\nE       4       6       Application: Unstable\r\n U      5       15      System Failure: Stop error\r\n U      5       19      Security issue\r\nE       5       19      Security issue\r\nE P     5       19      Security issue\r\nE       5       20      Loss of network connectivity (Unplanned)\r\n U      6       11      Power Failure: Cord Unplugged\r\n U      6       12      Power Failure: Environment\r\n  P     7       0       Legacy API shutdown\r\n<\/pre>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/cc770416.aspx\">Restart or Shut Down a Remote Computer and Document the Reason<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Examples * Restart in 5 seconds with reasons being planned application maintenance: shutdown \/r \/f \/t 5 \/c &#8220;server reboot&#8221; \/d p:4:1 Syntax C:\\Windows\\system32>shutdown \/? Usage: shutdown [\/i | \/l | \/s | \/r | \/g | \/a | \/p &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=11049\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[110],"tags":[661,596],"class_list":["post-11049","post","type-post","status-publish","format-standard","hentry","category-win7","tag-reboot","tag-win7"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-2Sd","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/11049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11049"}],"version-history":[{"count":2,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/11049\/revisions"}],"predecessor-version":[{"id":11051,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/11049\/revisions\/11051"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}