Kaseya Community

Request Reboot - User logged in

  • Anyone have a script that will ask/notify the logged in user to reboot?
    We have a script that removes a certain software package but it requires a reboot. We'd like to notify the user to reboot when it is done.

    Legacy Forum Name: Request Reboot - User logged in,
    Legacy Posted By Username: Erik
  • Actually I have and it's based on 2 scripts:

    Script Name: Reboot with User Prompt
    Script Description: This script works with Reboot with User Prompt 2 and it will Reboot Computer with User Prompt (Yes/No). If Timeout will prompt user to respond if he is there. If no answer Reboot in 5 minutes, telling user to save everything.

    IF User Response is Yes
    Parameter 1 : PC updated and needs to be rebooted, Save all your data and click yes to reboot or click no to reboot later.
    Parameter 2 : 3
    THEN
    Write Script Log Entry
    Parameter 1 : Rebooting
    OS Type : 0
    Reboot
    OS Type : 0
    ELSE
    Execute Script
    Parameter 1 : Reboot with User Promt 2
    Parameter 2 : 4
    Parameter 3 : 1
    OS Type : 0

    Script Name: Reboot with User Promt 2
    Script Description: This script works with Reboot with User Prompt and it will Reboot Computer with User Prompt (Yes/No). If Timeout will prompt user to respond if he is there. If no answer Reboot in 5 minutes, telling user to save everything.

    IF User Response is Yes
    Parameter 1 : Are You There? If you are not currenty there, the system will restart automatically.
    Parameter 2 : 2
    THEN
    Execute Script
    Parameter 1 : Reboot with User Prompt
    Parameter 2 : 4
    Parameter 3 : 1
    OS Type : 0
    ELSE
    Send Message
    Parameter 1 : Please Save all your Data. Computer Rebooting in 5 minutes.
    Parameter 2 : 1
    OS Type : 0
    Pause Script
    Parameter 1 : 300
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Timeout Reboot.
    OS Type : 0
    Reboot
    OS Type : 0

    This is well tested. Feel free to change text.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: christian@syneteksolutions.com