Link to home
Start Free TrialLog in
Avatar of Jay Chads
Jay ChadsFlag for Germany

asked on

I need help with a Script for Regular Windows 10 Restart after checking system uptime?

I need help creating a Script that will Check if the Uptime(Hours) is exided on Windows 10 Operating Systems. I am not that Scripting guy just a newbie in the Scripting world.The following will be the Parameters I would like to have:

Parameter 1 specifies after how many hours without rebooting the user is asked via a message box  to restart their computer themself or to shut down .

Parameter 2 specifies after how many hours without restarting will the script plan an automatic restart in 60min (with no prompt for cancelling)


The script must be controllable with at least two parameters
Thank You in Advance
ASKER CERTIFIED SOLUTION
Avatar of MURUGESAN N
MURUGESAN N
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
C:\Windows\System32\shutdown.exe /r
C:\Windows\System32\shutdown.exe /s
...
Look for help using following command using cmd.exe
C:\Windows\System32\shutdown.exe

Open in new window

$ echo  "Thank you for closing this and " | wc
      1       6      32

Open in new window