Restarting In Baseline if Setting is present

(imported topic written by Bill.Ehardt)

I’ve created a baseline for monthly patching. As the last step in the baseline, I’m trying to reboot, only if it finds client setting “__Auto_Reboot” = “true” and only if it requires a restart.

I created a copy of the “Restart Needed” fixlet, and set the relevance to:

1. pending restart
2. (((exists it) AND (it = "true")) of (value of setting "__Auto_Reboot" of client))

I updated the action lock post-action to restart after action completed, with a message and a deadline of 1 minute, but it doesn’t seem to want to reboot. What do I need to do to make sure only servers that need it, and have that setting get rebooted?

I’m getting a “failed” for the result of this baseline piece.

(imported comment written by SystemAdmin)

I’m not crazy for line 2. How about changing line 2 to be…

exists setting “__Auto_Reboot” whose (value of it = “true”) of client

(imported comment written by Bill.Ehardt)

Ok, that cleans it up some, we got that from our sales rep while we were doing a POC. But still, I’m not sure how to force it to reboot properly? I can add an action of Reboot 120, but how do we customize the reboot message?

We’d like it to add to the eventlog like a standard shutdown.exe does.

(imported comment written by SystemAdmin)

The Bigfix reboot message to the user comes from the Post-Action tab when you’re scheduling the action. Set the message title and message text and choose the deadline and if you’re rebooting it automatically or requiring user interaction.

If you want a specific eventlog entry, you can probably kick off eventcreate.exe which is in the system32 folder.

See: http://technet.microsoft.com/en-us/library/bb490899.aspx for the syntax.

Like…

waithidden cmd /C eventcreate /l SYSTEM /t WARNING /id 1000 /so BigFix /d “Rebooting for some reason”

(imported comment written by Bill.Ehardt)

I can look at that if I need to, but are you saying there is no way to do what I want to do? Add a reboot with a custom message, only for servers that have that client setting?

(imported comment written by SystemAdmin)

I am also using baselines for monthly MS patch deployment. I would like to have the compute reboot after the patch install if it’s required but I would also like to build in a 24 hour delay on the reboot message. This way it gives users a chance to reboot on their own with out a prompt (many do it nightly) but for those that haven’t rebooted with in 24 hours of having the patches installed they will get a reboot required message. Is this a possibility? If so what would be the best way to do it? It would be great if there was an option to “delay” the Post-Action message for a user defined period of time!

(imported comment written by SystemAdmin)

wmehardt - You can certainly have a Post-Action message that you can give those servers. However, you wouldn’t mix PCs who should and shouldn’t get the message. You can create a computer group based on the client settings, and use that to target who should see the message (as 1 action) and those who shouldn’t see the message (as a 2nd action).

(imported comment written by cstoneba)

I’ve always thought it would be a good idea if you could specify relevance for the post action tab. That way, you could target some, or all, of the clients to reboot. Paul, can you add that as an enhancment request?

(imported comment written by Bill.Ehardt)

Sorry, should have responded I came up with a workaround shortly after that, thanks!

(imported comment written by SystemAdmin)

Hi cstoneba,

If you want to submit a request from Bigfix, unfortunately you’d have to request that yourself. Though I frequent the forums, I don’t work for Bigfix. :slight_smile:

Thinking about it, that would be interresting to have any of these:

  1. Allow a relevance line on the post-action

  2. Maybe have an action command that can manipulate the criteria of the post action depending on the success of the action in progress (to enable/disable the message to be displayed at the end)

  3. Maybe have an action command called "message <OK|OKCANCEL|YESNO> "

  4. Post action message delay (unlike deadline) to delay the reboot message and/or only display the message if the PC hasn’t been rebooted yet

Another way to display a message or not might be to create a vb script that displays a messagebox that you could run from the action (depending if it’s a server or not). Then from the post-action you wouldn’t display any message. Not quite elegant though.

Paul

1 Like

(imported comment written by cstoneba)

ha, sorry Paul. My mistake.