which switches should I use for gpupdate /force not to cause a logoff or a reboot ?

please help
itbabeAsked:
Who is Participating?
 
Vee_ModCommented:
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0
 
Toni UranjekConsultant/TrainerCommented:
Hi!

AFAIK "gpupdate /force" will not reboot or logoff if you don't use /boot and/or /logoff switches.

Toni
0
 
itbabeAuthor Commented:
no,  but it wil still ask whether the user wants a reboot or a logoff
I want the command to run automatically without asking input from the user.

For now i have cmd /c ECHO n ECHO n|gpupdate /force,  but this is only responding to the first question.
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
Toni UranjekConsultant/TrainerCommented:
May I ask why you want to put gpupdate in script? Policies are automatically procesed every 90 + random 0..30 minutes. And if they require reboot or logoff, new settings will afect computers and/or users only after reboot and/or logoff.
0
 
itbabeAuthor Commented:
I need to use the command to apply a security policy after a software package has been installed on a pc.

Eg when access is given to the programfiles folder by the policy.

I found the solution : cmd /c (echo n & echo n)|gpupdate /force
0
 
MyITGuyCommented:
I decided to run each one individually.

echo n | gpupdate /target:user /force
echo n | gpupdate /target:computer /force

or..

echo n | gpupdate /target:user /force && echo n | gpupdate /target:computer /force
0
 
GSMELHDCommented:
Thanks that worked for me
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.