Servers - General

ups shutdown script

Occasional Visitor

ups shutdown script

Hi everybody,


I am trying nearly everything at the moment....


HP 1500 G3 connected to a 2008 R2 Server.


I want to create a script which is shutting down two servers. One of this servers is the management server. But I think this doesn' matter at all.


At first I tried to use an "old school" batch file (shutdown /s /....) - script works out of the HP Power Protector Software but doesn't have any effect within the software.


Then I tried the java script thing. This also doesn't work.


Beginning with the example script it looks this:


UserScript = {   name: "MyScript",   enabled: false,     // Set this property to true to enable the script.   onEvent: true,      // If true the script is called each time an event occurs.   delay: 0,           // This property can be used to delay first execution of the action in milliseconds.   interval: 10000,    // and every 10s from that   onStart: function() // Startup function (optional)   {     exec("C:\Windows\System32\shutdown.exe /s /t 30 /m \\<server>");   },   action: function()  // Script action definition   {      exec("C:\Windows\System32\shutdown.exe /s /t 30 /m \\<server>");  


  },   onStop: function() // Ender function (optional)   {     // Use this place to insert finalization code   } }


I also tried to start my original batch file (with some echo command for the log file)


I'm completely stuck now. Please give advice, thanks a lot!






P.S. This post has been split off from other thread, and moved to Servers > general. - Hp Forum Moderator