Is it possible to abort remotely a shutdown /t command in Windows?

CB 9 1 Reputation point
2021-01-28T15:39:16.55+00:00

I have a simple WPF app that controls and monitors a few Windows 10 machines on an internal network- All it does is Ping and Shutdown. I'm creating batch files on the fly and calling them using Process.Start(..).

I can successfully remote shutdown a machine using:

shutdown /s /f /t 30 /m \\MYMACHINE_NAME

I'm trying to add an Abort button to a command already sent. I thought this would do it:

shutdown /s /a /m \\MYMACHINE_NAME

But it doesn't work.

I know that on the remote machine itself I can call Shutdown /a and it'll abort the existing shutdown for that box, but I'm trying to Abort remotely.

Possible?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,705 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2021-01-28T15:47:57.797+00:00

    Another possibility.
    https://learn.microsoft.com/en-us/sysinternals/downloads/psshutdown

    --please don't forget to Accept as answer if the reply is helpful--

    1 person found this answer helpful.

  2. Dave Patrick 426.1K Reputation points MVP
    2021-01-29T01:54:47.723+00:00

    Also it works fine here using;

    shutdown /s /f /t 60 /m \\win10x64ftv

    shutdown /a /m \\win10x64ftv

    61661-image.png

    --please don't forget to Accept as answer if the reply is helpful--

    1 person found this answer helpful.
    0 comments No comments

  3. Dave Patrick 426.1K Reputation points MVP
    2021-01-28T22:43:42.01+00:00

    From the link above;
    You can use PsShutdown to initiate a shutdown of the local or a remote computer, logoff a user, lock a system, or to abort an imminent shutdown.

    --please don't forget to Accept as answer if the reply is helpful--


  4. Jenny Yan-MSFT 9,326 Reputation points
    2021-01-29T07:39:07.477+00:00

    Hi,
    When using PsShutdown, there is limitation that aborts a shutdown (only possible while a countdown is in progress).
    https://learn.microsoft.com/en-us/sysinternals/downloads/psshutdown

    Moreover, here is command to abort the shutdown process on remote machines using a csv file of server names, you could modify based on your request and have a try.
    https://community.spiceworks.com/topic/1998972-abort-shutdown-remotely

    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

    ----------

    Hope this helps and please help to accept as Answer if the response is useful.

    Thanks,
    Jenny

    0 comments No comments