Please use this script to reboot the target machine with user interaction.
Note:
Here are some cases such as,
Script should be run as Logged in User then only we can get the user response if they logged in
---
Comments