Fix: Gpedit Shutdown Script Not Running or Working

Double-check your script location to ensure it applies

by Claire Moraa
Claire Moraa
Claire Moraa
Author
Claire likes to think she's got a knack for solving problems and improving the quality of life for those around her. Driven by the forces of rationality, curiosity,... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • If you are using a GPO to shut down your computer and it is not working, there may be an issue with your script.
  • The most common reason for this is a user who does not have permission to run the script.
  • This can be easily resolved by switching to an account with administrative privileges.
XINSTALL BY CLICKING THE DOWNLOAD FILE
To fix Windows PC system issues, you will need a dedicated tool Fortect is a tool that does not simply clean up your PC, but has a repository with several millions of Windows System files stored in their initial version. When your PC encounters a problem, Fortect will fix it for you, by replacing bad files with fresh versions. To fix your current PC issue, here are the steps you need to take:
  1. Download Fortect and install it on your PC.
  2. Start the tool's scanning process to look for corrupt files that are the source of your problem
  3. Right-click on Start Repair so the tool could start the fixing algorythm
  • Fortect has been downloaded by 0 readers this month.

Gpedit script is a useful tool that you can use to automate tasks like shutting down your computer at a time specified by you. This can be very helpful for people who work on their computers for long hours and need to take a break.

Unfortunately, running scripts can be a hit or a miss. You can learn more about script errors in our detailed article. For now, let’s find out why this particular one is not running and how to resolve it.

Why is my Gpedit shutdown script not running?

If you have set up a Gpedit shutdown script that runs when you log off, it may not be running as expected. This could be due to several reasons:

  • The script has not been created or saved correctly – To run the script, it must exist in the correct folder location. If the file is stored in another directory, an error message will appear when you try to run the script. The default directory should be: C:\WINDOWS\System32\GroupPolicy\Machine\Scripts\Shutdown
  • Your computer belongs to an Active Directory domain – If your computer belongs to an Active Directory domain, you may need to check the security policy of the domain as an administrator may have locked it.
  • Your script is running under a different user account – If you’re running the Gpedit shutdown script with a different user account than the one shutting down the computer, it may not work. Gpedit shutdown script works by changing registry keys and values. If you have multiple users on your computer, you may have noticed separate registry hives for each user account hence why you need to be keen on the account you’re using.
  • Another program has taken over the shutdown process – This is a common problem and happens because there are some programs that will automatically run at startup or shutdown.
  • The policy isn’t being applied in time – In most cases, if a computer hasn’t rebooted yet after installing a policy update, it will not be processed until after the next reboot. 
  • Virus infection – If your computer has been infected with malware or another kind of virus, it may have modified some system files in such a way that they prevent Gpedit from running properly.

What can I do when my Windows shutdown script not running?

Before any complex solutions, try the following basic workarounds:

  • If the time on your computer is wrong, this could be causing your problem. Make sure that it is set correctly before continuing.
  • Ensure that no other programs are running that may interfere with your script running properly.
  • Make sure that the task has been scheduled in the Task Scheduler.
  • Double-check the script location and ensure it is in the shutdown folder.
  • Verify that the script is set to run under the correct user account with requisite administrative privileges and permissions.
  • Check whether your user profile is corrupt and repair it where necessary.
  • Restart your PC to see if any unfinished policies need to be applied.

1. Add the shutdown script manually 

  1. Hit the Windows + R keys to open the Run command.
  2. Type gpedit.msc in the dialog box and hit Enter.GPEDiT.msc -Windows Remediation Service Failed to Start?
  3. Navigate to the following location: User Configuration /Windows Settings /Scripts /Shutdown
  4. Double-click on Shutdown to open its Properties.
  5. Click on Add.
  6. Enter your script name. Alternatively, you can click on the Show Files to locate it in its folder.

2. Force restart the GPO

  1. Hit the Windows key, type cmd, and select Run as administrator.cmd-run-admin-w11 unexpected kernel mode trap windows 11
  2. Type in the following command and press Enter: GPupdate/force
  3. Reboot your PC.

3. Scan for viruses

  1. Click on the Start Menu icon, search Windows Security, and click Open.
  2. Select Virus & threat protection.
  3. Next, press Quick scan under Current threats.
  4. If you don’t find any threats, proceed to perform a full scan by clicking on Scan options just below Quick scan.Scan options
  5. Click on Full scan, then Scan now to perform a deep scan of your PC.Full Scan Scan Now
  6. Wait for the process to finish and restart your system.

Expert tip:

SPONSORED

Some PC issues are hard to tackle, especially when it comes to missing or corrupted system files and repositories of your Windows.
Be sure to use a dedicated tool, such as Fortect, which will scan and replace your broken files with their fresh versions from its repository.

It’s easy to forget how vulnerable Windows is and what damaging things malware can inflict on the computer. If the effects of the infection are beyond Windows Defender’s capabilities, you should try out a more comprehensive antivirus solution such as ESET Smart Security Premium.

4. Reset Group Policy Editor

  1. Hit the Windows key, type cmd, and select Run as administrator.cmd-run-admin-w11 unexpected kernel mode trap windows 11
  2. Type in the following commands and press Enter after each one: RD /S /Q "%WinDir%\System32\GroupPolicyUsers" && RD /S /Q "%WinDir%\System32\GroupPolicy"gpupdate /force
  3. Restart your PC.

If none of these methods seem to do it for you, perhaps it’s time you tried out third-party applications. You can try out Group Policy Management tools to help you simplify the process.

We also have answers on what to do when your Group Policy keeps reverting, so be sure to check out our article on the same.

Do let us know if your shutdown script has succeeded after trying our recommended fixes.

Still experiencing issues?

SPONSORED

If the above suggestions have not solved your problem, your computer may experience more severe Windows troubles. We suggest choosing an all-in-one solution like Fortect to fix problems efficiently. After installation, just click the View&Fix button and then press Start Repair.

This article covers:Topics: