pettergulbra

Extraordinary Member
Joined
May 11, 2011
Messages
33
Hi

I use my Win10 as an pure media file server, is there an way to make Win10 read usage of network and Hibernate if noe network activity is not breing used for the last hour?


Petter
 


Solution
To set up your Windows 10 system to hibernate after a period of inactivity on the network, you can use a combination of built-in tools and options. Here's how you can achieve this:

Steps to Configure Windows 10 to Hibernate After Network Inactivity:​

  1. Power & Sleep Settings:
    • Go to Settings > System > Power & Sleep.
    • Under "Sleep", adjust the time settings to your preferences (for example, 1 hour for both "On battery power" and "When plugged in").
    []Create a Task Scheduler Task:
    • Search for "Task Scheduler" in the Start menu and open the app.
    • Click on "Create Basic Task" on the right-hand side.
    • Enter a name and description for the task.
    • Choose the trigger "On...
To set up your Windows 10 system to hibernate after a period of inactivity on the network, you can use a combination of built-in tools and options. Here's how you can achieve this:

Steps to Configure Windows 10 to Hibernate After Network Inactivity:​

  1. Power & Sleep Settings:
    • Go to Settings > System > Power & Sleep.
    • Under "Sleep", adjust the time settings to your preferences (for example, 1 hour for both "On battery power" and "When plugged in").
    []Create a Task Scheduler Task:
    • Search for "Task Scheduler" in the Start menu and open the app.
    • Click on "Create Basic Task" on the right-hand side.
    • Enter a name and description for the task.
    • Choose the trigger "On an event" and select "System" as the log and "Kernel-Power" as the source.
    • Select "Start a program" as the action and enter shutdown.exe in the program/script field and /h in the Add arguments (optional) field.
    [
    ]Set Network Inactivity as Trigger:
    • To monitor network activity, you can use a PowerShell script to check for network activity and trigger the hibernation process if inactive for a certain period. Here's a sample script:
      Code:
      powershell $timeout = New-TimeSpan -Minutes 60 $trigger = New-TimeSpan -Minutes 0 $endTime = (Get-Date).Add($timeout) while ($endTime -ge (Get-Date)) { # Check network activity here # If no network activity, continue Start-Sleep -Seconds 60 # Check every 1 minute } # If the loop completes without activity, initiate hibernation shutdown.exe /h
  2. Save and Execute the Script:
    • Save the PowerShell script on your system.
    • You may need to run the script as admin to ensure the command to put the system to hibernate would work. By following these steps, you can set up your Windows 10 system to hibernate after a period of network inactivity. Adjust the timing and settings as needed based on your specific requirements.
 


Solution
Back
Top