Jump to content
Sign in to follow this  
Shaggy2

Monitor Restart Service* Modify

Recommended Posts

Any help on this script would be huge help...

I made a copy of the Monitor Restart Service* and would like to modify it for a certain server to use.  I would like to place the following into the script -

Get Reboot Info -

If server uptime is less than 1 hour - Stop and send ticket.

If server uptime is more than 1 hour - continue with restart script.

-------------------

Then I need to place this into the script somewhere -

reboot server if restart of POP service was unsuccessful.  (this should only happen if it falls into the category above)

Thanks!

 

 

Edited by Shaggy2
Hit submit to quick

Share this post


Link to post
Share on other sites

Start using SHELL and something like this https://www.windowscentral.com/how-check-your-computer-uptime-windows-10 get the results returned directly into %shellresult% and then save it to a variable @uptime@ which you can then perform math on to make your logic.

Everything you're asking about can be accomplished either in Powershell using Execute Script or Shell with labtech scripting logic.

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.

Sign in to follow this  

×
×
  • Create New...