Jump to content

Reboot only if reboot is pending

Recommended Posts


I want to reboot my servers only when it's really needed.

We have like 100 servers running in production, so it's necessary to only reboot when needed after updates.

I found a script test-pendingreboot but can't get it in a proper script to run it

Should be like this if test-pendingreboot is "true"  {restart-computer}

Hope you can help me out


Link to post
Share on other sites
  • Administrators

Hi Patrick,

Our patch management feature will only restart the OS if the windows update component says a reboot is pending. I can help you fix the script if you share it here too.


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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Create New...