Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Please post the essentials of your script. Commented Feb 1 at 6:39
  • I have added screenshot of the script
    – Harsh
    Commented Feb 1 at 11:14
  • @Harsh Please do not screenshot text - instead, please copy/paste the script text within a code box in the question. It would also be helpful to see the task - please export the task in Task Scheduler, open the export in a text editor, then copy/paste it into a code box. A simple fix would be modifying the power settings at the start of the script (e.g. changing to Performance), then setting it back to normal at the end of the script.
    – JW0914
    Commented Feb 1 at 13:04
  • I have modified the script as you said but that doesn't worked as required.
    – Harsh
    Commented Feb 2 at 4:42
  • You do understand that that script, even if it were ran when the system was shutting down, would not prevent the shutdown of the system. So the script would end prematurely. Is that your problem or is it you can't figure out how to run it when the system is shutting down?
    – Ramhound
    Commented Feb 2 at 4:52