tinymor.blogg.se

How to set sleep time on windows 7
How to set sleep time on windows 7












Powershell -command "(gcim Win32_OperatingSystem). Here's a Command Prompt example (uses PowerShell): powershell -command "(Get-WmiObject Win32_OperatingSystem).LastBootUpTime" (gcim Win32_OperatingSystem).LastBootUpTime Here's a PowerShell example: (Get-WmiObject Win32_OperatingSystem).LastBootUpTime WScript.Echo objDateTime.GetVarDate ' Example: 12:16:22 PM Set OS = wmiService.ExecQuery("SELECT * FROM Win32_OperatingSystem").ItemIndex(0) Set objDateTime = CreateObject("WbemScripting.SWbemDateTime") Set wmiService = GetObject("winmgmts://localhost/root/cimv2") Note that the returned date is in WMI date time format which you'll need to use tools to convert into a human readable date. You can also get the last boot time by using the WMI service object to query the LastBootUpTime property of the Win32_OperatingSystem class. Information about scheduled / unscheduled sleeps and reboots should be found by expanding the tree view in the left plan to Event Viewer > Windows Logs > System.

how to set sleep time on windows 7 how to set sleep time on windows 7

Next to When I press the power button, select Sleep, and then select Save changes. Do one of the following: If you’re using a desktop, tablet, or laptop, select Choose what the power buttons do.

how to set sleep time on windows 7

To open a command prompt, click Start, click All Programs, click Accessories and then click Command Prompt. For Windows 7, click the Startbutton, click Control Panel, click System and Security, and then click Power Options. Have you consulted Event Viewer? To start Event Viewer by using a command line














How to set sleep time on windows 7