asked on
Startup Script GPO
Hello,
I've created a start-up script for the machines in our Domain, I placed this script in C:\Windows\SYSVOL\sysvol\Domain\Policies\Machine\Scripts\Startup. I've also set the GPO --> Computer Configuration\Policies\Windows Settings\Scripts\Startup to point to the above location. If I simply reboot a client machine it doesn't apply the script, if I run gpupdate /force then reboot it applies the script. How can I force this script to be applied from reboot? All other GPO's apply with out issue.
You could always loop a gpudate command to all the systems. https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/gpupdate
ASKER
What I'm trying to accomplish is to set DEP to OptOut mode via GPO. I've created three PS Scripts:
- Enable Execution Policy Unrestricted
- gpupdate /force
- bcdedit.exe /set nx OptOut
placed them in the correct location within SYSVOL, added through our Computer GPO on Domain Controller which applies the setting, however after adding these scripts reboots take around 5 -7 minutes. Why would startup scripts affect reboot times?
ASKER
Thanks all for the comments, McKnife I followed the link you provided, good stuff.
Thanks!
Hello,
when you want to reapply a policy, you must not only modify the script in the folder "C:\Windows\SYSVOL\sysvol\Domain\Policies\Machine\Scripts\Startup ".
You must also modify the GPO itself : renaming, change something, to be sure that a new version and date are set on the GPO.
If you dont do that, the modification of the script is not seen, and the script not executed again, as the GPO is considered as already applied.