Run script on remote computer

Run script on remote computer

Post by RGFubnl » Tue, 12 Sep 2006 23:55:04


We have 10 Windows 2003 domains (1 root, 8 children, 1 grandchild) and 28
Windows 2003 Domain Controllers.

company.com (2 DCs)
childA.company.com (2 DCs)
grandchildA.childA.company.com (4 DCs)
childB.company.com (4 DCs)
childC.company.com (4 DCs)
childD.company.com (3 DCs)
childE.company.com (3 DCs)
childF.company.com (2 DCs)
childG.company.com (2 DCs)
childH.company.com (2 DCs)

At the end of this message is a script called MasterScript. MasterScript
causes each and every Domain Controller in the forest to locally run its own
local copy of a second script called SlaveScript. I run MasterScript from my
workstation, which is a member of ChildA.company.com, and I run it using
Enterprise Admin credentials from the root domain (company.com). Everything
works just fine except that in exactly 2 of the child domains (child C and
child F) none of the 6 Domain Controllers will locally run their local copy
of SlaveScript. When I locally log into each of the 6 problem Domain
Controllers using the same Enterprise Admin credentials, I can manually run
the local copy of SlaveScript and it works fine.
So it seems that the childC and childF domains (or at least their DCs) are
set to not allow remote script execution. What am I missing?





----------- MasterScript -------------------------
str_exeToRunRemotely = "WScript.exe " & Chr(34) & "C:\Program
Files\EventLogArchive\SlaveScript" & Chr(34)

For int_counterI = 1 To 28

' Connect to WMI
set obj_WMIService = GetObject("winmgmts://" & ary_str_DCs(int_counterI) &
"/root/cimv2")

' Obtain the Win32_Process class of object.
Set obj_process = obj_WMIService.Get("Win32_Process")
Set obj_program = obj_process.Methods_("Create").InParameters.SpawnInstance_
obj_program.CommandLine = str_exeToRunRemotely

' Execute the program now at the command line.
Set obj_shell = obj_WMIService.ExecMethod("Win32_Process", "Create",
obj_program)

Next
----------- MasterScript -------------------------
 
 
 

1. Running a script on a remote computer (different domains)

2. No Effect on running the scripts on remote computer


Hello !

I have a script that I would like to run on several remote machines.

strRemoteComputer = "machine_name"
strWorkerScript = "script_name.vbs"
Set objWshController = WScript.CreateObject("WshController")
Set objRemoteScript = objWshController.CreateScript(strWorkerScript,
strRemoteComputer)
objRemoteScript.Execute

Script is running without error but
nothing happens, there is no effect on remote computer.


--
aparnamsaraf
------------------------------------------------------------------------
aparnamsaraf's Profile: http://www.yqcomputer.com/
View this thread: http://www.yqcomputer.com/

http://www.yqcomputer.com/

3. running a .MSi file on a remote computer with a script.

4. Running Script Against Remote Computer

5. WMI remote call in python script to create process on remote windows computer

6. WMI remote call in python script to create process on remote windows computer

7. run .cmd scripts on remote machine (automating the MOSS install via scripts)

8. Command to run a batch files I want to run on a remote computer

9. computer variable for computer at hosted server company, can't run backup script

10. computer variable for computer at hosted server company, can't run backup script

11. bizzare remote desktop issue; "The computer can't connect to the remote computer."

12. A program that grabs keyboard typing on remote computer without software installation on remote computer.

13. Rule 'run a script' not running my script

14. Remote scripting: how to send results back to initiating computer

15. Program runs fine on my computer, won't run on end user computers