Fix: Gpedit Shutdown Script Not Running or Working
Double-check your script location to ensure it applies
- 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.
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
- Hit the Windows + R keys to open the Run command.
- Type gpedit.msc in the dialog box and hit Enter.
- Navigate to the following location:
User Configuration /Windows Settings /Scripts /Shutdown
- Double-click on Shutdown to open its Properties.
- Click on Add.
- Enter your script name. Alternatively, you can click on the Show Files to locate it in its folder.
2. Force restart the GPO
- Hit the Windows key, type cmd, and select Run as administrator.
- Type in the following command and press Enter:
GPupdate/force
- Reboot your PC.
3. Scan for viruses
- Click on the Start Menu icon, search Windows Security, and click Open.
- Select Virus & threat protection.
- Next, press Quick scan under Current threats.
- If you don’t find any threats, proceed to perform a full scan by clicking on Scan options just below Quick scan.
- Click on Full scan, then Scan now to perform a deep scan of your PC.
- 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
- Hit the Windows key, type cmd, and select Run as administrator.
- 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
- 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.