Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Wed, 7 May 2008 21:55:00 -0700,    group: microsoft.public.win32.programmer.wmi        back       


Best way to shutdown several remote windows 2003 server from 1 ser   
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
date: Wed, 7 May 2008 21:55:00 -0700   author:   David$oegiharto

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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us