restart computer remotely

S

Sameh Ahmed

Hello there
I am working on my home windows XP Pro remotely, my problem now is that I
cannot restart or shut down the machine through the remote desktop
connection.
I tried a the below script and it gave me an error "Privilege not held"
I tried the command shutdown -r from the CMD and it said; a shutdown is in
progress.
any ideas?
Thanks in advance
Sameh

computertouse = "."
Set OpSysSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" &
computertouse & "").ExecQuery("select * from Win32_OperatingSystem where
Primary=true")
for Each objInstance in opsysset
'msgbox(objInstance.name)
objInstance.Win32ShutDown(4) '''''and also objInstance.Win32ShutDown(6)
next
msgbox("Script eneded")
 
S

Shenan Stanley

Sameh said:
I am working on my home windows XP Pro remotely, my problem now is
that I cannot restart or shut down the machine through the remote
desktop connection.
I tried a the below script and it gave me an error "Privilege not
held"
I tried the command shutdown -r from the CMD and it said; a shutdown
is in progress.
any ideas?
Thanks in advance
Sameh

computertouse = "."
Set OpSysSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//"
& computertouse & "").ExecQuery("select * from Win32_OperatingSystem
where Primary=true")
for Each objInstance in opsysset
'msgbox(objInstance.name)
objInstance.Win32ShutDown(4) '''''and also
objInstance.Win32ShutDown(6) next
msgbox("Script eneded")


CTRL+ALT+END while remoted in, shutdown and/or restart the remote computer
like you were sitting in front of it?
 
S

Shenan Stanley

Sameh said:
I am working on my home windows XP Pro remotely, my problem now is
that I cannot restart or shut down the machine through the remote
desktop connection.
I tried a the below script and it gave me an error "Privilege not
held"
I tried the command shutdown -r from the CMD and it said; a shutdown
is in progress.
any ideas?
Thanks in advance
Sameh

computertouse = "."
Set OpSysSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//"
& computertouse & "").ExecQuery("select * from Win32_OperatingSystem
where Primary=true")
for Each objInstance in opsysset
'msgbox(objInstance.name)
objInstance.Win32ShutDown(4) '''''and also
objInstance.Win32ShutDown(6) next
msgbox("Script eneded")


I realized you might mean "just this once you suddenly cannot get the remote
machine to restart/shutdown for you" - and if that is the case - you may
have to wait until you or someone else can get to the remote machine
physically to fix it.
 
S

Shenan Stanley

Sameh said:
I am working on my home windows XP Pro remotely, my problem now is
that I cannot restart or shut down the machine through the remote
desktop connection.
I tried a the below script and it gave me an error "Privilege not
held"
I tried the command shutdown -r from the CMD and it said; a shutdown
is in progress.
any ideas?

Shenan said:
I realized you might mean "just this once you suddenly cannot get
the remote machine to restart/shutdown for you" - and if that is the
case - you may have to wait until you or someone else can get to the
remote machine physically to fix it.


Sameh said:
there is only logoff and disconnect buttons in the start menu
shutdown command does not work also?
is it supposed to work when ran from terminal services?

Have you tried "CTRL+ALT+END" when focused or fuill-screened in the Terminal
Serices connection?
It's like pressing CTRL+ALT+DEL on your local PC - giving you all the
options on the remote computer you would have if you pressed CTRL+ALT+DEL
while sitting at its keyboard.
 
S

Sameh Ahmed

there is only logoff and disconnect buttons in the start menu
shutdown command does not work also?
is it supposed to work when ran from terminal services?
Thanks
Sameh
 
C

Chetan Raghavendra [MSFT]

You might try shutdown -t 0 -r. This will reboot the machine immedately
instead of some delay.

--
Thanks
Chetan
(e-mail address removed)

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

If you press 'Alt-Ctrl-End' and go to the 'Shut Down' menu, you should be able to shut down (Turn Off) or restart the remote computer.
 
S

Sameh Ahmed

I terminal to my home machine through a terminal server at work.
so it gives me the "Windows security" of the terminal server...
Regards
Sameh
 
S

Sameh Ahmed

just takes the command and does nothing
this is really frustrating.
regards
Sameh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top