Remote shutdown ("unattended")

lynx

Distinguished
Jul 3, 2001
10
0
18,510
Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

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

Distinguished
Jun 28, 2005
463
0
18,780
Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

"" 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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

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
>
>
>
 

lynx

Distinguished
Jul 3, 2001
10
0
18,510
Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

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
>
 

lynx

Distinguished
Jul 3, 2001
10
0
18,510
Archived from groups: microsoft.public.windowsxp.work_remotely (More info?)

Thanks Jeffrey

for pointing out [- i] parameter which is conveniently hushed up in MS Help
& Support description. Possibly this way they encourage users to issue /?
first :)

Anyway the result is the same: succeeded but needs to be attended for
power-off-push-button-safe-action

Unfortunately there is no option in displayed dialogue similar to

/POWEROFF as in tsshutdn command

.. a bit frustrating. It should be the way remembering the fact that normal
shutdown powers off the box

Regards