Jump to content


cmb

Task Sequence - Get Pending Reboot Status Then Restart Computer

Recommended Posts

Hello all. I am well versed in the Software Update functionality of SCCM but am just now getting into Task Sequences and could use some help.

 

I am attempting to create a task sequence that performs the following:

  1. Check for pending reboot state
  2. If pending reboot state = true then restart computer
  3. After reboot, install deployed software updates
  4. Restart computer
  5. Perform scan cycle and determine compliance
  6. If non compliant, install software updates
  7. Restart Computer
  8. Repeat steps 5 through 7 again if necessary
  9. Complete

 

I have been messing around with the Get-PendingReboot PowerShell script from the gallery: https://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542

 

I'm a bit lost on how to take the results of a Run PowerShell Script task and use it as a condition to run a Restart Computer task.

 

I also have no idea how I would execute a compliance scan and initiate a software update install of the computer if found to be non-compliant based on the software updates I've deployed to it.

 

If it matters at all, I'm specifically focused on servers with strict maintenance windows. Our business is adverse to downtime so I need to attempt to configure SCCM to make the most of the small maintenance windows we have. Ideally our servers should come out of a maintenance window fully compliant and not in a pending reboot state.

 

Any help provided is greatly appreciated.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.