locked
Windows 10 Shutdown Scripts not always running RRS feed

  • Question

  • Hi,

    We have a shutdown script setup on our win 10 machines (mixture of 1511 and 1607)...

    However the script does not run on every shutdown.

    If I look in the group policy logs in event viewer when it doesn't run there is nothing in the group policy log at the time of shutdown (surely there should be something even if there was a problem with the script)... So I don't think they are always processing group policy correctly at shutdown.

    We do have the policy "Always wait for network... applied which sorts out other issues, so not removing that, but don't think it should have any bearing on this...

    Kind Regards,

    John

    Tuesday, February 14, 2017 5:53 PM

All replies

  • Hi,

    Before going further, would you please use the command “gpupdate /force” to ignore all processing optimizations and reapplies all settings. And then check whether the issue still exists? After you run gpupdate, could you see the new script keys in  HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Group Policy\ Scripts\ Shutdown?

    Also, please use command “gpresult” in clients to collect the GPOs, and then check whether the GPO contains the Script (Shutdown) related settings were really applied to clients or weren’t.

    In addition, please check whether you had assign users correct permissions to access and run this script.

    If all OK, please find event logs and check whether some errors for the shutdown settings of GPO.

    Troubleshooting Group Policy Using Event Logs

    http://technet.microsoft.com/en-us/library/cc749336(v=WS.10).aspx

    I also found several users who had the similar issue as yours, they gave the advices may help you, please refer to the link:

    Shutdown /s /t xx doesn't work in my Windows 10 pc

    http://stackoverflow.com/questions/32237324/shutdown-s-t-xx-doesnt-work-in-my-windows-10-pc

    Please Note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best Regards,

    Tao


    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, February 15, 2017 5:39 AM
  • Hi,

    I think it is mainly when the machines are shutdown via our shutdown scripts, if a user shuts the machine down the scripts usually run.

    Anyway I have also set the script up as a scheduled task now triggered by a 1074 event.

    Sunday, February 26, 2017 2:40 PM
  • OK, I think you are right. Have you solved the problem? We are looking forward to your good news:)

    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 1, 2017 8:20 AM
  • Hi

    I have the same problem.

    it has any solution?

    thanks

    Wednesday, October 25, 2017 12:43 AM
  • Windows 10 has this funny "feature" called "Fast Startup", that does not shut down completely, when clicking "shutdown". Your machine is just hibernated and does not run shutdown scripts reliable.

    You can disable that in different ways:



    Via Registry

    - Open Registry Editor.
    - Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
    - Right-click in the right pane and create a new DWORD.
    - Name it HiberbootEnabled and set its value to 0.
    - Exit Registry and you should be good to go.


    Or Group Policy 
    - Open Group policy Editor.
    - Navigate to Computer Configuration > Administrative Templates > System > Shutdown.
    - Right-click on the Require use of fast startup line and click Edit.
    - Make sure that you choose either Disabled or Not configured in order for Fast Startup to be accessible in local settings.
    - Confirm changes and navigate to Power Options > Choose what power buttons do > Change settings that are currently unavailable and disable Fast Startup.
    - If you set it to Enabled, the Fast Boot will be enabled by default and you won’t be able to disable it from within the System settings.


    Friday, December 6, 2019 2:58 PM