Windows 10: Group Policy shutdown script preventing PC from shutting down

Discus and support Group Policy shutdown script preventing PC from shutting down in Windows 10 Customization to solve the problem; On my machine, I have a script which shuts a Mac down via ssh. It's been tested and works ok. It doesn't require any input. This script is used on... Discussion in 'Windows 10 Customization' started by Haridarshan Patel, May 8, 2019.

  1. Group Policy shutdown script preventing PC from shutting down


    On my machine, I have a script which shuts a Mac down via ssh. It's been tested and works ok. It doesn't require any input.


    This script is used on shutdown and is set in local GPO.


    However, when ever this is set, the PC does not shutdown and simply shows the shutting down message with the spinning dots and no matter how long you leave it, it doesn't shutdown. Also, the Mac does not turn off either.


    The command in the script is "plink user@deviceip -pw password "shutdown -h now""


    I have removed user, ip and password from the example and may be incorrect as i'm typing it from memory, but that is the gist of the command.


    plink is located in the system directory, so it can run by just typing the command.


    I'm not sure why this may be happening. The command use to work without any issues a year ago, but i don't know what build.


    Not sure which build we're currently running on the machine.


    Hopefully someone will be able to help out. Looking forward to your replies.

    :)
     
    Haridarshan Patel, May 8, 2019
    #1

  2. Group Policy shutdown script no longer works after upgrade to Win10

    I confirm this issue is real. It's happening to me too. I experimented and determined Group Policy shutdown script NOT being triggered when a SHUTDOWN is invoked. But the shutdown script IS being triggered when a REBOOT is invoked.

    To reproduce this issue, simply do the following:

    - Create a batch file in C:\temp\test.bat

    - Put a single line in the batch file:

    "echo %DATE% %TIME% I was here >> C:\temp\test.log"

    - Save batch file.

    - gpedit.msc

    - Under Computer Configuration ==> Windows Settings ==> Scripts ==> Shutdown, add "C:\temp\test.bat" as a script to be triggered during shutdown.

    - run gpupdate

    - Reboot Windows. Notice the line logged in C:\temp\test.log.

    - Shutdown Windows. Power on the PC. Notice there is no additional line logged in C:\temp\test.log.

    And by the way, I've been working in SW Support and QA in Silicon Valley for years. These unhelpful answers by so called "Support Engineers" that give generic advice without any comprehension of the problem like telling customers to reinstall components,
    check for patches, disconnect all external devices, etc, are a real big annoyance and only degrade the already abysmal reputation of Windows being an unstable buggy OS. These "Support Engineer" answers are only showing people that Microsoft has hired a bunch
    of people who don't understand SW to support their product. Please stop them.
     
    henry.l.lee, May 8, 2019
    #2
  3. Allan Mej Win User
    GROUP POLICIES IN WINDOWS 10

    You can change Group Policies by opening Group Policy Editor first. You can open it by following these steps:

    • Log in an administrator account. If you are already logged in as an administrator, proceed to step 2.
    • Press Windows + R to open Run.
    • Type gpedit.msc and press Enter.

    After opening Group Policy Editor, you can now make the necessary changes that you want.

    Should you have more concerns, feel free to post.

    Regards.
     
    Allan Mej, May 8, 2019
    #3
  4. St0RM53 Win User

    Group Policy shutdown script preventing PC from shutting down

    GPO script policies not working on Windows 10 1809

    It seems group policies under Local Group Policy Editor>Computer configuration>Administrative Templates>System>Scripts are not working in Windows 10 version 1809. Back in 1803 they worked perfectly fine.

    I can confirm that they can be set and the changes are shown in the registry (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System) but the system does not care about them and uses default settings.

    More importantly i want the "Specify maximum wait time for group policy scripts" to work since it prevents my PC restarting or shutting down unless 600 seconds (aka 10 minutes which is the default value - which is a ridiculously long value and Microsoft should
    use a more appropriate default value like 5 seconds) of uptime has passed, as this PC is under a domain which is not always accessible as i am not always connected to the domain network.

    Back in 1803 i had this policy set to 1 second to prevent this issue. Now none of the policy settings there work anymore.

    Anyone found a fix or should i downgrade back to 1803?
     
    St0RM53, May 8, 2019
    #4
Thema:

Group Policy shutdown script preventing PC from shutting down

Loading...
  1. Group Policy shutdown script preventing PC from shutting down - Similar Threads - Group Policy shutdown

  2. Startup scripts and Group Policy Editor

    in Windows 10 Gaming
    Startup scripts and Group Policy Editor: I run a Network Monitor Gadget on my desktop which loads at startup, as well as a VPN. The monitor always starts before the VPN loads, which forces me to shut off the monitor and restart it to correctly show the VPN IP address. Is there some way I can use the Group Policy...
  3. Startup scripts and Group Policy Editor

    in Windows 10 Software and Apps
    Startup scripts and Group Policy Editor: I run a Network Monitor Gadget on my desktop which loads at startup, as well as a VPN. The monitor always starts before the VPN loads, which forces me to shut off the monitor and restart it to correctly show the VPN IP address. Is there some way I can use the Group Policy...
  4. Group policy script on start up or shutdown

    in Windows 10 Gaming
    Group policy script on start up or shutdown: Hi, I have a bat script to disable Internet explorer, I have tested it and all works ok but now looking to deploy via a gpo, but not sure if I need to run in start up scrips or shutdown as the script needs a reboot to take affect?...
  5. Group policy script on start up or shutdown

    in Windows 10 Software and Apps
    Group policy script on start up or shutdown: Hi, I have a bat script to disable Internet explorer, I have tested it and all works ok but now looking to deploy via a gpo, but not sure if I need to run in start up scrips or shutdown as the script needs a reboot to take affect?...
  6. Group policy script on start up or shutdown

    in Windows 10 Installation and Upgrade
    Group policy script on start up or shutdown: Hi, I have a bat script to disable Internet explorer, I have tested it and all works ok but now looking to deploy via a gpo, but not sure if I need to run in start up scrips or shutdown as the script needs a reboot to take affect?...
  7. Prevention from shutting down the laptop

    in Windows 10 Performance & Maintenance
    Prevention from shutting down the laptop: I recently faced an issue regarding the prevention of the laptop from shutting down it said 'task host window preventing the pc from shutting down and then says to go back and save anything which was not saved' so instead of cancelling and checking why was the issue occurring...
  8. Is it possible to prevent apps from preventing my pc from shutting down?

    in Windows 10 Ask Insider
    Is it possible to prevent apps from preventing my pc from shutting down?: I can no longer hit shut down and walk away from my pc, I have to wait and see if there's an application preventing my computer from shutting down to which I click "shut down anyway", it happens almost every time I try to shutdown or restart. It's hardly ever the same app...
  9. Apps that prevent my PC from shutting down

    in Windows 10 Ask Insider
    Apps that prevent my PC from shutting down: So I have 2 programs in the autostart, Winamp and Chatty and before format Winamp used to prevent from shutting down, now after the format it's Chatty (I believe having them in autostart casuses the problem, maybe it's something different). Is there any solution? submitted...
  10. Shutdown script (gpedit) runs with 'Restart' but not with 'Shut down'

    in Windows 10 Support
    Shutdown script (gpedit) runs with 'Restart' but not with 'Shut down': Dear all, I have an issue with a shutdown script that I don't manage to resolve: I wrote a .bat file script that works fine when it is clicked on. Through gpedit.msc, I added it as a shutdown script. When the computer is restarted (Power -> Restart), it works fine as well...

Users found this page by searching for:

  1. group policy shutdown scripts

    ,
  2. group policy shtdown script preventing PC from shutdown