Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
How to restart compute node using c# api?

问题 How to restart compute node using c# api?

  • 2012年4月22日 12:17
     
     

    Hi, 

    I need to Restart Compute node Using c# api.

    Thanks in advanced for the help.

    Ben 

全部回复

  • 2012年4月23日 2:25
     
      包含代码

    Hello.

    System.Diagnostics.Process.Start("shutdown.exe", "-r -t 0");

    But i would use not C# but WMI or WinRM - this task is more "native" for them.

  • 2012年4月24日 10:01
     
     

    Hi,

    I need to periodically restart the compute node automatically .

    Can I use ,"System.Diagnostics.Process.Start("shutdown.exe", "-r -t 0")", for that purpose ?

    Thanks,

    Ben