I have a bigfix script to restart systems in 30 seconds. When I execute the action, some systems rebooted fine, some system mention “Pending Message” as their status. I referred to Console guide of Bigfix and pending message means it is waiting for user to accept the message. In bigfix, i selected the 2nd option located which mentions " Run independently… " . I just want to force reboot irrespective of the user presence. Any script which can force them to reboot in xx seconds ?
The “force restart” option in the “Post-Action” part of the Take-Action Dialog will control this behavior and should give you the option you are looking for. “pending message” will be the initial status returned (because it is the last thing the agent reports before restart), but the computer should restart and should update its status after the restart.
I highly recommend you use the built in settings of the take action dialog rather than trying to force the shutdown/restart through dos. Our code to cause restarts/shutdowns has had considerable effort applied to make sure restarts occur reliably and the clients report their current state and action statuses appropriately. Over time it has proven to be very reliable.
Here are the settings you need on the post action tab to force a reboot.
Restart computer after action…
Leave ‘allow user to cancel restart’ unchecked
Set deadline to any period (minimum 1 minute) to allow any active users to see the restart message and have a chance to save work.
The relevance can be anything as long as it evaluates to true. The simple statement ‘true’ would be enough. You don’t need any action script. You can leave it blank and just use the settings in the post action dialog. The settings for the post-action dialog are in my post above.
I have a simular question for resrating machines. When we push updates, pc’s can be in either one of three states: 1.Powered on - no user logged on.
Powered on and user logged on
Turned off. laptop or user that powers off at night.
We want a single policy that would handle any of these, like apply the patch or update then restart now if no user is logged on, apply the update and offer the user to restart and give then time to restart.
Do we have the ability to do that in the Post action tab?
The standard “restart computer” should take care of this… If the user is logged in, they will be prompted and if not, the computer will be restarted automatically…
Is there a behavior that you are seeing that you don’t like?
Yes, the behavior I see is that if I set the restart message for the user at 1hr, then the machines that have no user logged on will also wait the 1 hr before they restart. We have to give the users a day or two to restart because they are facing deadlines and can’t restart at that shift, but I want the machines that can be restarted to then go ahead an restart. I will do more testing to verify.
Testing the restart action is going as expecetd. But I have been given another scenario for the production environment. Can the post action be configured to only restart if the no one is logged on? In other words, run the baseline to all machines, if no one is looged on, restart. If a laptop user then logs on, he will get the baseline but no message to restart because he will every night anyway. I only want the users that never seem to log off to get the message to restart. How would you go about this?
The post-action parameters are tied to the overall action relevance so you can’t have a different criteria for each… but you could do this:
Create a Task with the relevance “not exists logged on user” and the action “restart 300”… Once you have this Task, it has the behavior you want, which is to only restart when a user is not logged in.
Put this Task in your baselines at the end. (Make sure the “include in baseline relevance” checkbox is NOT checked).
When you take your baseline action, don’t specify the post-action restart (the Task will take care of that).
This should accomplish what you want, but you should test it to make sure.