Link to home
Start Free TrialLog in
Avatar of joukiejouk
joukiejouk

asked on

What command should I execute to have PSEXEC initiate a GPUPDATE for 400 remote machines?

I have a text file called "Computers.txt". It is located on a server that has PSEXEC installed. It is located in the following path on the server C:\Computers.

I need to execute a GPUpdate to all remote machines. In my text file, all it show is for example:

PCTest1
PCTest2

And so on. That is all I need in the text file right?

So, since I have to execute this command from a server (I have domain admin rights), how would I execute the command?

Given the info above, please type the psexec command exactly as should be.
Avatar of NVIT
NVIT
Flag of United States of America image

Try:
psexec @C:\Computers\computers.txt -u domain\adminname -p password -s -c gpupdate /force

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of kola12
kola12

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joukiejouk
joukiejouk

ASKER

So when I executed the command, this is what I get (below screen shot ). What does error code -1 mean? Did it fail? I know error code -0 mean it's successful.

User generated image
You should get this (this is polish language version):

\\COMPUTERNAME1:

Trwa aktualizowanie zasad...

Aktualizacja zasad użytkownika została ukończona pomyślnie.
Aktualizacja zasad komputera została ukończona pomyślnie.

gpupdate exited on COMPUTERNAME1 with error code 0.

\\COMPUTERNAME2:

Trwa aktualizowanie zasad...

Aktualizacja zasad użytkownika została ukończona pomyślnie.
Aktualizacja zasad komputera została ukończona pomyślnie.

gpupdate exited on COMPUTERNAME2 with error code 0.

...


Maybe you don't have privilage to computers...