Please use this script to reboot the target machine with user interaction.
Here are some cases such as,
- User can click 'Yes' button to reboot the machine after 2 minutes
- User can click 'No' button to raise the exception to create ticket
- If the User does not do anything the prompt will be hidden after 2 minutes and raise exception to create a ticket
Script should be run as Logged in User then only we can get the user response if they logged in