Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using the WSHController Deployment method

Posted on 2006-10-31
3
Medium Priority
?
314 Views
Last Modified: 2012-06-21
I need to copy the C:\windows\system32\GroupPolicy folder from the model computer and deploy that lgpo to several other XP computers.  Then I need to run the gpupdate /force on those computers.  Please provide the steps and script for this.  **I am not a scripting guy so I will need as much detail as possible to complete this task.  Thank you!!**
0
Comment
Question by:samiam41
[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
3 Comments
 
LVL 3

Accepted Solution

by:
royce2020 earned 2000 total points
ID: 17845787
If i was doing this, assuming all the comuters are networked, I'd have two scripts, one that copys the file, and a second one that tells the remote computer to run the frist one. Note that I don't know what file you're planing on copying, I've assumed that it's been copyed to \\server\public\group.grp and is destined for the users c:\windows\system32\ folder. Also, all the computes need to have administrative WMI turned on, you can do this by including the command "netsh firewall set service RemoteAdmin enable" (without the quotes) in their login script, and turned off again with "netsh firewall set service RemoteAdmin disable".

First script, save this in \\server\public\copy.vbs (for example):

Set fs = WScript.CreateObject("Scripting.FileSystemObject")
fs.copyfile "\\server\public\group.grp" "c:\windows\system32\"

Second script, run this as a domain administrator:

Function RunRemote (strCommand,strcomputer)
      Const OverwriteExisting = True
      
      strNamespace = "root\cimv2"

      Set objWMIService = GetObject ("winmgmts:\\" & strComputer & "\" & strNamespace & ":Win32_Process")
      Error = objWMIService.Create (strCommand, null, null, intProcessID)
      RunRemote = error
End function

arrNames = array("computer1","computer2")

for i = 0 to ubound(arrNames)-1
        nme = arrNames(i)
        x = runRemote ("\\server\public\copy.vbs",nme)
next

msgbox "done"
0
 
LVL 9

Author Comment

by:samiam41
ID: 17849924
Royce-  Thanks for the script.  I will be testing this out and will let you know what I find out.  
0
 
LVL 9

Author Comment

by:samiam41
ID: 17906958
Great work.  Sorry for the delay.  I have been out with the flu.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Six Sigma Control Plans

719 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