Link to home
Create AccountLog in
Avatar of ManieyaK_
ManieyaK_Flag for United States of America

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.

Avatar of DEMAN-BARCELO (MVP) Thierry
DEMAN-BARCELO (MVP) Thierry
Flag of France image

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.

ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of ManieyaK_

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?

They don't affect reboot times any longer than script execution takes. So if that effect is real and does not vanish, monitor your boot process using the tool procmon and its option to log the boot process.

Thanks all for the comments, McKnife I followed the link you provided, good stuff.


Thanks!