1

I have been using sc.exe to remotely stop a bunch of custom windows service(s) as part of our product deployment script. This was working perfectly until we migrated from windows 2003 to windows 2008 r2. Now no matter what you do query, stop, start etc it takes about 20 to 25 seconds to respond. There are 10 servers (8 virtual and 2 physical). It takes approx 20 ish seconds on physical and virtual servers.

The problem mainly is that my production deployments have gone from about 12 sec per environment to over a minute.

Just wondering if there are specific ports that may need to be opened on win 2008 firewall to allow the process to speed up or is there any specific permission required.

Note: It does work. It is just very slow.

Regards,

David

dmckenna
  • 233
  • 2
  • 9
  • are you still running the scripts from an w2k3/xp or are they running from a w2k8r2/win7? Also if you do the equivalent task local to a w2k8r2 server does it still take 20-30 sec's? – tony roth Sep 06 '10 at 22:57

1 Answers1

1

have you tried something like:

(gwmi -query "select * from win32_service where name='serviceiwanttostop'" -computer remoteserver).stop

from a powershell prompt to see if that's any faster?

Jim B
  • 23,938
  • 4
  • 35
  • 58