I have lots of PC's running on our network with Windows XP Firewall enabled, due to that I'm not able to run any VBscirpt (wmi) on those pc's remotely. It doesnt allow me to stop the Firewall service remotely.
Set colServiceList = objWMIService.ExecQuery("Associators of " _ & "{Win32_Service.Name='SharedAccess'} Where " _ & "AssocClass=Win32_DependentService " & "Role=Antecedent" ) For each objService in colServiceList objService.StopService() Next Wscript.Sleep 20000 Set colServiceList = objWMIService.ExecQuery _ ("Select * from Win32_Service where Name='SharedAccess'") For each objService in colServiceList errReturn = objService.StopService()
1) If I enable file and print services from Firewall, I can run the scripts. 2) Its not that easy to visit each PC and enable the File and print services. 3) Is there any way we can do this remotely? 4) GPO - We dont want Group policy for all the users.
Thanks guys! See if you still have some ideas to share ... Waiting!
Do you see any other logical solutions besides manually configure the firewall on each individual clients or automatically configure it through GPO ?
All in all, if firewall blocks all inbound traffic, wmi won't work no matter what you do. You will need to turn it off or configure it to allow wmi to pass through.