|
|
|
date: Wed, 7 May 2008 21:55:00 -0700,
group: microsoft.public.win32.programmer.wmi
back
Re: Best way to shutdown several remote windows 2003 server from
1 ser
Hi,
With WMI you can send a shut down command to the service on the first
server, then wait in a .Sleep(2000) loop until it gives a "stopped"
status code, then continue shutting down the second server.
David$oegiharto wrote:
> I'm new to WMI programming and I have a case: Shutdown several remote servers
> running Windows 2003 x32 and x64 from one server.
>
> The condition are:
> 1. Servers cannot be shutdown simultaneously - must be shutdown in order.
> ex. Specific services on Server A must be stopped first, then when
> services are stopped the Server A is shutdown. After server A is shutdown,
> then Server B can be shutdown.
>
> I already thought about old fashion way, which is: writing vbscript that
> shutdown server A (using command line "shutdown -f -t, etc") and looping
> while pinging its IP address, when the feedback is "request time out" then I
> continue shutting down server B.
> But I'm not sure if this is the best scenario, cause I cannot detect the
> services state and I think this scenario is vulnerable.
>
> Thank you for solution in advance.
>
> Regards,
>
> David
>
--
Gerry Hickman (London UK)
date: Mon, 12 May 2008 22:17:51 +0100
author: Gerry Hickman am
|
|