net use与shutdown配合使用,本机重启远程服务器

 

通过shutdown命令远程重启服务器的方法。
仔细想了想,又在网上找了相关的资料。通过如下两条命令,解决此问题。
  net use \\192.168.0.10 123456/user:administrator
  shutdown -r -m \\192.168.0.10 –t 0
  其中要先执行第一条命令,执行该命令后,我们便给服务器的administrator用户授予了远程重启的权限。
  然后我们在执行第二条命令,就可以在本机重启远程的服务器了。
 
PS:一、我们在使用上述两条命令时,请注意中间的空格,否则在使用过程中系统会提示相关的错误信息
  二、其实通过上述的命令我们还可以远程关机,只要我们把第二条命令稍微修改一下即可。关机命令如下:
shutdown -s -m \\192.168.0.10 –t 0
  三、使用此命令中的第一条时,必须要知道服务器上管理员帐户和密码
Last modified onSaturday, 05 January 2013 13:07

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0010413544{main}( ).../index.php:0
20.07814263976Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.07814263976Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.307011455256Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.307611479952Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.308411535280Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.308711562680require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.316411962312K2ControllerItem->execute( ).../k2.php:64
90.316411962312K2ControllerItem->display( ).../BaseController.php:710
100.325512613016K2ControllerItem->display( ).../item.php:78
110.325512613016K2ControllerItem->display( ).../controller.php:19
120.329512984056Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.332313004424K2ViewItem->display( ).../ViewController.php:102
140.417615832728K2ViewItem->display( ).../view.html.php:742
150.417615832728K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.419516005664include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0010413544{main}( ).../index.php:0
20.07814263976Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.07814263976Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.307011455256Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.307611479952Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.308411535280Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.308711562680require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.316411962312K2ControllerItem->execute( ).../k2.php:64
90.316411962312K2ControllerItem->display( ).../BaseController.php:710
100.325512613016K2ControllerItem->display( ).../item.php:78
110.325512613016K2ControllerItem->display( ).../controller.php:19
120.329512984056Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.332313004424K2ViewItem->display( ).../ViewController.php:102
140.417615832728K2ViewItem->display( ).../view.html.php:742
150.417615832728K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.419516005664include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top