Is it possible to run more commands when the Restart-Computer command issued? If yes, can you guys please send some example?
Asked
Active
Viewed 67 times
1
-
1Have a look here https://superuser.com/questions/165142/using-task-scheduler-to-run-a-task-before-shutdown – Daniel Oct 08 '21 at 18:22
-
Thanks @Daniel. The link shows that you have to create or put the script on the shutdown task or group policy. Is there a way to continue to run one long script even though the Restart-Computer command was issued with a delay or after all PS commands were issued? – sjqwer1 Oct 08 '21 at 18:30
-
Does this answer your question? [Powershell - Reboot and Continue Script](https://stackoverflow.com/q/15166839/3744182) – dbc Oct 09 '21 at 16:56