Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2015-01-26
4
Medium Priority
?
171 Views
Last Modified: 2015-02-19
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.
0
Comment
Question by:joukiejouk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 25

Expert Comment

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

Open in new window

0
 
LVL 3

Accepted Solution

by:
kola12 earned 1000 total points
ID: 40572188
You should use this:
psexec @C:\Computers\computers.txt -u domain\adminname -p password gpupdate /force
0
 

Author Comment

by:joukiejouk
ID: 40574189
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.

update error
0
 
LVL 3

Expert Comment

by:kola12
ID: 40574583
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...
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question