GithubHelp home page GithubHelp logo

hydrogen-mvm / win10activehours Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcosbozzani/win10activehours

0.0 0.0 0.0 179 KB

Controlling when Windows 10 will reboot after a Windows Update

License: MIT License

PowerShell 100.00%

win10activehours's Introduction

If this helps you, don't forget to leave a Github Star and upvote at StackOverflow https://superuser.com/a/1456571/351521

Win10ActiveHours

You can control the time which you allow Windows to automatically reboot per Windows Update operations without disabling anything or forcefully stopping the Windows Update service.

This script will not prevent any Windows Updates from being downloaded or installed ever so OS security patches will still be applied to the system ― you just have it reboot when you're ready.

Contributing

Pull requests and Issues are welcome!

If this project is useful to you, don't forget to leave a Github Star

You can also Buy me a coffee

How to use

  1. Download the setup.ps1 script

  2. Open PowerShell as Admin

  3. Navigate to the downloaded script directory

  4. Run Unblock-File .\setup.ps1

  5. Run Set-ExecutionPolicy RemoteSigned -Scope Process

  6. Commands:

    • .\setup.ps1: install the scheduled task
    • .\setup.ps1 -run: manually executes the scheduled task
    • .\setup.ps1 -uninstall: uninstall the scheduled task

How to verify the current Active Hours

  1. Press Win or click on the Start Menu

  2. Type Active Hours and click Change active hours

  1. The current settings are displayed below Change active hours

How it works

This scripts is based in this answer from StackOverflow: https://superuser.com/a/1208866/351521

This script creates a scheduled task that dynamically sets the Active hours settings for Start time and End time based on the run time it's executed while ensuring to increment the values to always be hours ahead.

The task will be created at \Win10ActiveHours\Update

There are two Active Hours windows of 18 hours:

  • from 18:00 to 12:00
  • from 06:00 to 00:00

There are four triggers that will active the tasks and switch between the two windows:

  • at computer start up
  • at computer wake up
  • daily at 06:00
  • daily at 18:00

These are the settings for the task:

  • wake to run
  • start when available
  • don't stop on idle end
  • allow start if on batteries
  • don't stop if going on batteries

win10activehours's People

Contributors

marcosbozzani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.