Psshutdown.exe does not start when added to Shutdown script (Computer Configuration\Windows Settings\Scripts (Startup/Shutdown) RRS feed

  • Question

  • I am attempting to use psshutdown.exe to remotely shutdown a pc that is on the same network.  When I launch psshutdown from command prompt it works without any problems and shuts down the remote pc correctly.  However, when I save the same command in a batch file and use that batch file in the shutdown script section, it does not work at all.  Can anyone suggest what might be the issue and if there are workaround?

    The batch file is called "shutdown.bat" and is placed at "C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown"

    Content of shutdown.bat:


    @echo off

    psshutdown -u user -p password \\129.130.xxx.xxx -k -f -t 10 -accepteula


    Note: there are no newline at the end of the batch file.



    Wednesday, July 6, 2011 9:37 PM


  • The script should be run under your user account token. I suggest you run the script as logoff script but not shutdown script.

    Overview of Logon, Logoff, Startup, and Shutdown Scripts in Windows 2000

    Scripts (Logon/Logoff): Use this extension to specify the scripts that run when a user logs on or logs off the computer. To configure the user logon and logoff scripts, start the Group Policy snap-in, expand User Configuration, expand Windows Settings, click Scripts (Logon/Logoff), and then in the right pane double-click the script that you want to configure. These scripts run on the User account and not on the Administrator account.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
    • Marked as answer by Arthur Xie Monday, July 18, 2011 9:07 AM
    Friday, July 8, 2011 7:54 AM