Run Script on multiple computers

Microsoft Windows server 2008 standard
April 7, 2011 at 06:30:39
Specs: Windows 2003, 4 GB

I have DC with Win 2003 OS and 100+ clients. My requirement is to run a script to Compress a folder which is in C:\ drive (OS Drive) on all Client PCs. I have a script which is running on single PC, But i am unable to run on multiple computers.

Script as follows

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colFolders = objWMIService.ExecQuery _
("Select * from Win32_Directory where name = 'C:\\ test'")
For Each objFolder in colFolders
errResults = objFolder.Compress
Wscript.Echo errResults

Note: TEST is a folder in all computers.

Can any one help me in this regard.

Thanks in advance.


See More: Run Script on multiple computers

Report •

April 8, 2011 at 10:00:35

Report •
Related Solutions

Ask Question