Solved

Using the WSHController Deployment method

Posted on 2006-10-31
3
307 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
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
royce2020 earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
word0 challenge 3 78
What is Python programming? 3 103
Is it possible to programatically fill out a fillable ADOBE PDF form? 9 77
Base1 Encode/Decode 3 68
RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now