Question Locked

gpupdate/force

0 helpful
14 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am suppose to do a gpupdate/foce on the computers in my section. I am given limited admin rights. How can i get these to automatically do this themselves, so i dont have to run around to each individual one. Takes longer to login than atually do this annoying task. I tried to set something up using the schedualed tasks but am not sure how to get the cmd gpupdate/force to run once i get the cmd line interface to open. Any help in this would be greatly appreciated.

14 replies

by rob miners

to the File Server with Administrator rights and in the run box type in gpupdate /force

If you haven't sufficient access you will be unable to perform this task. See the Network Administrator.

by jellimonsta

Hi,
You may be able to get it to run with a scheduled task (by specifying user/ pwd or selecting to only run if logged on).

You may need to create a batch file to run the commands.

@echo off

cd c:\windows\system32

gpupdate /force

exit

You can simply enter those commands in Notepad as save as gpupdate.bat. Then make sure there is a local copy on each system (or accessible) and schedule the task to run it.
Alternately, you can get it added to a logon script.
Good luck.

by rob miners

someone without the necessary permissions would be asked to run this in the first place. ;)

Could be some sort of problem if gpupdate isn't working. :)

by jgates88

I can go in and do the command and it works just fine. What Im really trying t supress is to not have to go to every individual machine login and do it. It takes more time loggoin in than to do it. I did some research on this and tell me if Im wrong but from what I was ready it gave me the feeling that gpupdate/force accomplishes the same thing as retarting the computer. could I be a effective as to just go arounf restarting the computers? Im still looking for a solution, and I thank you for the reply.
About the whole permissions thing, we are given some permissions. Things such as adding share drives, resetting paswords, creatiing distribution lists, and adding printers and software we are able to do. But some things we are prevented to do. So I really doubt its a permissions problem. If possible I would just like ot be able to create a schedule that wouldnt boot a user off if they were on. Some people tend to work late, really late. and if possible to do it after they log-off. Thi slast part isnt such a big problem cause most of the com,puters the same user uses and are here the same times everyday. But a few are shared and a couple are 24 hr ,around the clock, between 2 people.

by jgates88

Im curertnly trying your batch file. but there is one more hangup on the whole thing. After its refreshed hte policies, it asks if you want to reboot, y/n. and of courc=se yes is what I want. in this file would I just add it in and where. Ive never done any scripting, and have been actually wondeing about them, or a good spot mto go and learn about how to use and write them.
thanks again

by jellimonsta

You should be able to either put a Y or yes in a line before 'exit' in the script. I would schedule this task daily for 2AM or something, as you know the task only takes minutes to perform.

See if this link helps you out with batch files and scripting...
http://www.allenware.com/icsw/icswidx.htm

by rob miners

PsExec can be used to copy your batch File to the Workstations.
It could also be Scheduled from the File Server to run your Batch Files on the Workstations at the specified time.

PsExec v1.94
By Mark Russinovich
Published: January 4, 2008

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

And a batch file that can be copied to the workstations with the contents along these lines:

@echo off
cd C:\WINDOWS\system32
gpudate
shutdown -t 60
exit

< Typo >

by rob miners

but I just can't fathom why this particular task that normally runs from the File Server at regular intervals has to be added to all of the workstations by someone with a limited account. It's not something that I would normally do. It's also not something that I would ask of a Tech with limited access as it would become to complex. :D

Task Scheduler and security

http://technet2.microsoft.com/windowsserver/en/library/f60ea8d6-d2af-4dd0-b050-c09951826f5d1033.mspx?mfr=true

by jgates88

Going around to them all one more time and adding a task would be much more time effective than going to them all once every night, esspecially when other things come up. Thanks for your help in this so far.

by jgates88

I tried that before I emailed it. There is a period of time that it refreshes as you know and after that is when it should be restarted.
Right now my batch looks like the following:
@echo off
cd C:\windows\system32
gpudate
shutdown -t 60
exit
And thanks for the link, the help.
And this worked.

by jgates88

funny how that is exactly how i ended up doing it, the same batch file. you were a little late, but I appreciate your help in this matter. not that article brings up another question. if i go to my distro list that shows all of my computers, I work on a set of computers within a bigger domain. can i just select those computer names and make my sceduale apply to all of them?

by rob miners

my Bat file to what you already said was working for you. I had a path statement in the original.
************
@echo off
set path=C:\;C:\WINDOWS\system32
c:
gpupdate
blah blah
************

You will be able to connect to and run your Batch File on any NT Workstation in your Domain, once you get your Batch File distributed. Create your distro list of PC's and from the Server set it as a Task to run psexec at a given time to run the Bat on the Workstations and you should be in business.

This way you only have to use Task Schedular from the Server. It saves a lot of work having it centralised and automated. The only thing that you have to remember is that if you rebuild or add new Workstations that you will have to get your Batch File on them and add them to your Task list (distro list.) ;)

A bit more info for you.

Group Policy does not refresh

http://technet2.microsoft.com/windowsserver/en/library/b904dc05-56d7-4651-87df-c6a0c06a18021033.mspx?mfr=true

This discussion is closed to new replies.