How to see from commandline (!!!) if hibernation is on or off?

pstein

New member
Member
VIP
Local time
5:13 PM
Messages
244
How can users check from commandline (!!!) if hibernation is currently on or off?

When I search through the Internet then thousands of articles describe how to turn it e.g. on e.g. by

powercfg -H on

But what if I just want to let Win just show the current state WITHOUT to change it?

Is there really no way of just checking it from command line (NOT by Control Panel)?

Peter
 

My Computer My Computer

At a glance

win7pro 64bit
Computer type
PC/Desktop
OS
win7pro 64bit
I have an SSD therefor I do not use Hibernation. It's a horrible idea.

To find out if the feature is enabled, the file must exist, hiberfil.sys

To find out if the file exists, its a hidden file, try

sBaQmfd.png

Or try
Code:
assoc C:\hiberfil.sys
then try it with quotes "C:\hiberfil.sys".
 

My Computer My Computer

At a glance

Windows 7 Professional x64Intel Core i7 3612QM @ 2.10GHz12.0GB Dual-Channel DDR3 @ 798MHz1023MB NVIDIA GeForce GT 630M (HP)
Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv6t-7000
OS
Windows 7 Professional x64
CPU
Intel Core i7 3612QM @ 2.10GHz
Motherboard
Hewlett-Packard 181B (U3E1)
Memory
12.0GB Dual-Channel DDR3 @ 798MHz
Graphics Card(s)
1023MB NVIDIA GeForce GT 630M (HP)
Sound Card
Casual Sound Card
Monitor(s) Displays
Casual Monitor
Screen Resolution
1366x768
Hard Drives
447GB SanDisk SDSSDHII480G (SSD)
PSU
Typical Power Supply
Case
No Case
Cooling
HAVIT HV-F2056 17" Laptop Cooling Pad, Ultra Slim (3 Blades)
Keyboard
Some keyboard with backlight
Mouse
Some lenovo mouse
Internet Speed
60 vice-versa
Antivirus
Kaspersky Internet Security 2016
Browser
Mozilla Firefox
Other Info
This information hardly matters. Ego much?
This is excatly NOT true!

An existing hiberfil.sys can be an old fragment file which is not cleaned up. Or it was restored from a previous file/folder tree restoration.

Furthermore I have seen three month old hiberfil.sys files although the system was reboot a couple of times in the meantime.
Very strange!

So again: I search for a cmdline hibernation state detection command
 

My Computer My Computer

At a glance

win7pro 64bit
Computer type
PC/Desktop
OS
win7pro 64bit
This is excatly NOT true!

An existing hiberfil.sys can be an old fragment file which is not cleaned up. Or it was restored from a previous file/folder tree restoration.

Furthermore I have seen three month old hiberfil.sys files although the system was reboot a couple of times in the meantime.
Very strange!

So again: I search for a cmdline hibernation state detection command

The possibility you described is slimmer than you think. If Hibernation was turned off properly, the hiberfil.sys will have been removed along with it.

I've read deeper into the help file. Here you go :o. Stay thirsty, my friend.

EcZqisS.png
 

My Computer My Computer

At a glance

Windows 7 Professional x64Intel Core i7 3612QM @ 2.10GHz12.0GB Dual-Channel DDR3 @ 798MHz1023MB NVIDIA GeForce GT 630M (HP)
Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv6t-7000
OS
Windows 7 Professional x64
CPU
Intel Core i7 3612QM @ 2.10GHz
Motherboard
Hewlett-Packard 181B (U3E1)
Memory
12.0GB Dual-Channel DDR3 @ 798MHz
Graphics Card(s)
1023MB NVIDIA GeForce GT 630M (HP)
Sound Card
Casual Sound Card
Monitor(s) Displays
Casual Monitor
Screen Resolution
1366x768
Hard Drives
447GB SanDisk SDSSDHII480G (SSD)
PSU
Typical Power Supply
Case
No Case
Cooling
HAVIT HV-F2056 17" Laptop Cooling Pad, Ultra Slim (3 Blades)
Keyboard
Some keyboard with backlight
Mouse
Some lenovo mouse
Internet Speed
60 vice-versa
Antivirus
Kaspersky Internet Security 2016
Browser
Mozilla Firefox
Other Info
This information hardly matters. Ego much?
powercfg /query will also tell you. Look for the data after:

Power Setting GUID: 9d7815a6-7ee4-497e-8888-515a05f02364 (Hibernate after)
GUID Alias: HIBERNATEIDLE
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Both A/C and DC are set to 0 which means Hibernate is disabled.
 

My Computer My Computer

At a glance

Windows 10 Pro X64Intel Quad Core i7-4770 @ 3.4Ghz16.0GB PC3-12800 DDR3 SDRAM 1600 MHzIntel Integrated HD Graphics
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
cmd : powercfg –availablesleepstates
 

My Computers My Computers

  • At a glance

    11i5 860016 gb ddr41050 ti
    Computer type
    PC/Desktop
    OS
    11
    CPU
    i5 8600
    Memory
    16 gb ddr4
    Graphics Card(s)
    1050 ti
    Browser
    chrome
  • Computer type
    PC/Desktop
How can users check from commandline (!!!) if hibernation is currently on or off?

When I search through the Internet then thousands of articles describe how to turn it e.g. on e.g. by

powercfg -H on

But what if I just want to let Win just show the current state WITHOUT to change it?

Is there really no way of just checking it from command line (NOT by Control Panel)?

Peter

if you visit your Shut Down menu, then right click the arrow to the right of that word, a pop-up menu appears. If Hibernate shows up on that menu, it's enabled/turned on; if it's absent from that menu, it's disabled/turned off.

or just enter this command to Powershell
HTML:
$hibernation = Get-CimInstance -ClassName Win32_PowerManagementCapabilities | Select-Object HiberFilePresent

if ($hibernation.HiberFilePresent -eq $true) {
    Write-Host "Hibernation is on"
} else {
    Write-Host "Hibernation is off"
}
 

My Computers My Computers

  • At a glance

    Windows 10
    Computer type
    Laptop
    OS
    Windows 10
  • Computer type
    PC/Desktop
powercfg /a
 

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Back
Top