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