LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-03-2013, 03:58 AM   #1
Scory
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Rep: Reputation: 0
How to remotely hibernate Windows machine


Hello.

I know how to remotely poweroff windows machine from linux server — one line and all is OK:
Code:
$ net rpc shutdown -f -C <some commment> -I <ip_of_computer> -U <username%password>
That's working good.

But how to hibernate windows machine remotely in the same way?
Didn't find the solution. It seems my google-fu is broken now :-(
 
Old 12-03-2013, 05:51 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,499

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
probably you need to add -h, but I'm not really sure about that.
 
Old 12-03-2013, 06:02 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,423

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
From just running shutdown on my Win7 PC:

Code:
Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]
    [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]

    No args    Display help. This is the same as typing /?.
    /?         Display help. This is the same as not typing any options.
    /i         Display the graphical user interface (GUI).
               This must be the first option.
    /l         Log off. This cannot be used with /m or /d options.
    /s         Shutdown the computer.
    /r         Shutdown and restart the computer.
    /g         Shutdown and restart the computer. After the system is
               rebooted, restart any registered applications.
    /a         Abort a system shutdown.
               This can only be used during the time-out period.
    /p         Turn off the local computer with no time-out or warning.
               Can be used with /d and /f options.
    /h         Hibernate the local computer.
               Can be used with the /f option.
    /e         Document the reason for an unexpected shutdown of a computer.
    /m \\computer Specify the target computer.
    /t xxx     Set the time-out period before shutdown to xxx seconds.
               The valid range is 0-315360000 (10 years), with a default of 30.
               If the timeout period is greater than 0, the /f parameter is
               implied.
    /c "comment" Comment on the reason for the restart or shutdown.
               Maximum of 512 characters allowed.
    /f         Force running applications to close without forewarning users.
               The /f parameter is implied when a value greater than 0 is
               specified for the /t parameter.
    /d [p|u:]xx:yy  Provide the reason for the restart or shutdown.
               p indicates that the restart or shutdown is planned.
               u indicates that the reason is user defined.
               If neither p nor u is specified the restart or shutdown is
               unplanned.
               xx is the major reason number (positive integer less than 256).
               yy is the minor reason number (positive integer less than 65536).
So, yes, looks like -h is the way to go, although the documentation does mention "local computer", so not sure if it'll work remotely.

Last edited by TenTenths; 12-03-2013 at 06:04 AM.
 
Old 12-03-2013, 06:15 AM   #4
Scory
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TenTenths View Post
From just running shutdown on my Win7 PC:
+++++ skipped +++++
So, yes, looks like -h is the way to go, although the documentation does mention "local computer", so not sure if it'll work remotely.
Yep, did not work remotely. Seems net rpc from samba works in different way.
 
Old 12-03-2013, 06:20 AM   #5
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,423

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
Quote:
Originally Posted by Scory View Post
Yep, did not work remotely. Seems net rpc from samba works in different way.
A shot in the dark but are you sure the power management on the remote machine supports "hibernate"?
 
Old 12-03-2013, 09:45 AM   #6
Scory
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TenTenths View Post
A shot in the dark but are you sure the power management on the remote machine supports "hibernate"?
Definitely. UPS software (from Powercom) for Windows on this certain PC successfully sends PC to hibernate state. But I plan to link UPS by USB cable with linux server (24/7 on), which will switch off media/game/.../center remotely and switch off itself — in case of power failure, of course. By the NUT, of course.

Any suggestions? Ple-e-ase...
 
Old 12-03-2013, 11:00 AM   #7
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,423

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
How to remotely hibernate Windows machine

Just go with the full shutdown rather than hibernate.
 
Old 12-03-2013, 11:08 AM   #8
Scory
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TenTenths View Post
Just go with the full shutdown rather than hibernate.
It's not a case, obviously. This thread about hibernate, not about “just do something because can not do right thing”.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
remotely connect to windows xp/vista machine jazzo Linux - Networking 6 08-16-2012 02:06 PM
ability to put a server in hibernate during a power flux and then wake remotely j-me Linux - Server 2 01-22-2009 08:37 AM
how to shutdown,restart and log off windows machine remotely through a linux machine deepak rawat Fedora 1 05-23-2006 01:25 AM
How can connect to Linux remotely from a Windows machine? imsam Linux - Networking 2 07-27-2004 09:01 PM
need to run a server remotely from a windows machine klintonray Linux - Software 3 04-18-2003 05:33 PM


All times are GMT -5. The time now is 06:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration