Remote shutdown ("unattended")



Lynx
07-09-2005, 11:10 PM
Hi Guys,
When remotly shutting down computer using
shutdown -s -f -m \\someName
the remote one will come up with a message "....it is safe to switch...."
At the same time the normal shutdown would turn power off
And that is what I am trying to achieve
Is it any way to perform "unattended mode" of remote shutdown?
(the remote comuter is win2000 Pro SP4)
Thanks in advance

Sparda
07-09-2005, 11:10 PM
"" wrote:
> Hi Guys,
> When remotly shutting down computer using
> shutdown -s -f -m \someName
> the remote one will come up with a message "....it is safe to
> switch...."
> At the same time the normal shutdown would turn power off
> And that is what I am trying to achieve
> Is it any way to perform "unattended mode" of remote shutdown?
> (the remote comuter is win2000 Pro SP4)
> Thanks in advance

Dose the remote computer actualy support auto power off?

--
Posted using the http://www.windowsforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.windowsforumz.com/Work-Remotely-Remote-shutdown-unattended-ftopict553401.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.windowsforumz.com/eform.php?p=1756499

Jeff Nall
07-09-2005, 11:10 PM
Cut n past this into notepad and save with the extension ".vbs".

strComputer = "atl-dc-01"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & _
strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Shutdown(1)
Next

Replace strComputer with "." to reboot the machine on which you're running
the script, or the name/ip of the remote computer you want to shutdown.

This method works well for 2000/xp TS or not. Make sure you've got admin
rights on the target machine.

Jeff Nall



"Lynx" wrote:

> Hi Guys,
> When remotly shutting down computer using
> shutdown -s -f -m \\someName
> the remote one will come up with a message "....it is safe to switch...."
> At the same time the normal shutdown would turn power off
> And that is what I am trying to achieve
> Is it any way to perform "unattended mode" of remote shutdown?
> (the remote comuter is win2000 Pro SP4)
> Thanks in advance
>
>
>

Jeff Nall
07-09-2005, 11:10 PM
Oops..I forgot to post the link where I got the information from.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_tasks__desktop_management.asp

Lynx
07-09-2005, 11:10 PM
Thanks Jeff.
I tried it and the error msg I'm getting is
(2, 1) Microsoft VBScript runtime error: The remote server machine does not
exist or is unavailable: 'GetObject'
I didn't mentioned that command/script executed from XP Pro SP2
in order to shutdown W2000
Thanks again

Jeffrey Randow (MVP)
07-10-2005, 10:34 AM
Also, try running shutdown -i ... With that tool, you can configure
this in a friendly GUI...
---
Jeffrey Randow (Windows Networking MVP)
jeffreyr-support@remotenetworktechnology.com
http://www.networkblog.net (My Networking Blog)
http://www.remotenetworktechnology.com (Support Site)

On Tue, 5 Jul 2005 22:03:06 +1000, "Lynx" <aka@ppt.com> wrote:

>Hi Guys,
>When remotly shutting down computer using
>shutdown -s -f -m \\someName
>the remote one will come up with a message "....it is safe to switch...."
>At the same time the normal shutdown would turn power off
>And that is what I am trying to achieve
>Is it any way to perform "unattended mode" of remote shutdown?
>(the remote comuter is win2000 Pro SP4)
>Thanks in advance
>


Remote shutdown ("unattended")