Skip to main content

How to switch to the dark mode automatically on Windows 10

Windows 10 comes with two personalization modes ― the light mode, which is the bright default mode on every installation, and it works very well during daytime; and the dark mode that tints parts of the OS and supported apps with a dark color scheme, and it's more suitable for low-light conditions, such as when working late at night.

Although you can quickly change modes using the Settings app, unlike Night light, Windows 10 doesn't include an option to use the light mode during the day and automatically switch to the dark mode at night. However, it's still possible to create an automated process using a couple of PowerShell commands and Task Scheduler to automatically switch to the dark mode at a particular time of your choosing.

In this Windows 10 guide, we'll walk you through the steps to configure your computer to switch to the dark mode automatically using PowerShell and Task Scheduler.

How to switch between light and dark mode on Windows 10

In order to switch back and forth between light and dark mode automatically on Windows 10, you'll need to schedule two tasks, each one running a different PowerShell command that will change the Registry setting that controls the personalization modes.

Warning: This is a friendly reminder that editing the registry is risky, and it can cause irreversible damage to your installation if you don't do it correctly. It's recommended to make a full backup of your PC before proceeding.

Creating task to switch to the dark mode

The first thing you need to do is to set up and schedule a task to enable the dark mode at a specific time at night, which you can do with the following steps:

  1. Open Start.
  2. Search for Task Scheduler and click the result.
  3. Expand the Task Scheduler Library folder.
  4. Right-click Task Scheduler Library and select New Folder.

  1. Enter a name for the folder (e.g., MySchedules), and click OK.Quick Note: We're creating a new folder to keep yours and system tasks separate, which makes it easier to manage tasks.
  2. Right-click the newly created folder and select Create Task.

  1. On the "General" tab, under "Name," enter a descriptive name for the task (e.g., switch_dark_mode).
  2. Under "Security options," select the option Run whether user is logged on or not option.
  3. Check the Do not store password option.

  1. Click on the Triggers tab.
  2. Click the New button.
  3. Under "Begin the task," select On a schedule, but you can configure any trigger you want.
  4. Under "Settings," select the Daily option.
  5. Set the time (e.g., 6:30 PM) you want Windows 10 to switch automatically to the dark mode.
  6. Click OK.

  1. Click on the Actions tab.
  2. Click the New button.
  3. Using the "Start a program" action, under "Settings," copy and paste the following path:%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
  4. Under "Add arguments (optional)," copy and paste the following PowerShell command:New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -ForceThe above command will try to create a AppsUseLightTheme DWORD in the Registry and set its value to 0, which disables the light mode and enables the dark mode.
  5. Click OK.

  1. Click on the Settings tab.
  2. Check the Run task as soon as possible after a scheduled start is missed option, which should help to run the command if Task Scheduler misses the schedule because your computer was asleep. (Just remember that according to Microsoft's documentation, using this option, Task Scheduler can take up to ten minutes or so to run missed tasks.)
  3. Check the If the task fails, restart every option, and make sure it's set to 1 minute and only 3 restart attempts.
  4. Click OK.

Once you've completed the steps, every day at the time you specified, Windows 10 will switch to the dark theme automatically.

Creating task to switch to the light mode

The last thing left to do now is to create another task to change from the dark to the light theme, which you can do with the following steps:

  1. Right-click the folder created to store your tasks and select Create Task.

  1. On the "General" tab, under "Name," enter a descriptive name for the task (e.g., switch_light_mode).
  2. Under "Security options," select the option Run whether user is logged on or not option.
  3. Check the Do not store password option.

  1. Click on the Triggers tab.
  2. Click the New button.
  3. Under "Begin the task," select On a schedule, but you can configure any trigger you want.
  4. Under "Settings," select the Daily option.
  5. Set the time (e.g., 6:30 AM) you want Windows 10 to switch automatically to the light mode.
  6. Click OK.

  1. Click on the Actions tab.
  2. Click the New button.
  3. Using the "Start a program" action, under "Settings," copy and paste the following path:%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
  4. Under "Add arguments (optional)," copy and paste the following PowerShell command:Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1The above command will update the AppsUseLightTheme DWORD in the Registry with the value of 1, which enables the light mode and disables the dark mode.
  5. Click OK.

  1. Click on the Settings tab.
  2. Check the Run task as soon as possible after a scheduled start is missed option, which should help to run the command if Task Scheduler misses the schedule because your computer was asleep. (Just remember that according to Microsoft's documentation, using this option, Task Scheduler can take up to ten minutes or so to run missed tasks.)
  3. Check the If the task fails, restart every option, and make sure it's set to 1 minute and only 3 restart attempts.
  4. Click OK.

After creating both tasks, Windows 10 will automatically switch between light and dark theme on the schedule you specified without having to restart your computer for the changes to take effect.

If you no longer want to use this feature, you can simply go to the Task Scheduler folder you created, right-click, and delete each task. Then you can continue to use the Settings app to switch modes from the Personalization section.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

17 Comments
  • Interesting tip.
  • This could be an interesting change everyday
  • Awesome tip
  • Wonderful! I still hope this will get implemented in Windows like Night light.
  • Great idea! Something like Automatic themes in Maps for Day & Night.
  • Thanks! Surely someone else must have thought this :) There is no such suggestion in my (Danish) Feedback Hub, which I can upvote, and creating the feedback in my country would yeild almost no upvotes. How about yours, Withheld :)? here's a suggested feedback name for it, if you think it is best to create it in yours: Suggestion: Let Light and Dark mode follow the time of day, like nightlight.
  • This article is one of the many reasons why Windows 10 S will fail, in which you can't change the registry.
  • Yes, because the average user wants to go into the registry.
  • @maktaba, actually this is one of the exemplary reasons on why Windows 10 S is extremely useful... You and I aren't the target, but my mother, aunt, grammas, etc they all are... and they will never even care to see what a registry key or powershell is.  
  • I use dark mode all the time
  • I also use dark mode all the time and believe Microsoft should promote it as one of the most important characteristic in W10 and W10M.
  • Nice tip. Dark mode is great, but I think they should switch from the current, pitch-black background color to a dark grey, like they did with the store. Also, I hope they release a UWP file explorer soon, 'cause that could really use a dark mode at night.
  • But Windows 10S is not meant for those who enjoy hackery or want to hack around. That is what Pro, Enterprise, and the new Workstation versions are for. 10S is meant for those who use this stuff like an appliance. The Out of box experiece (OOBE) is all they are really after. Grandma, grandps, children, noobs those who don't care about all this underpinning, hackery stuff. If hackery is your game, pick a version that allows it or ohter OS's which allows it. How many regular people mess arounf in teh registry (Windows only), config files (OSX, *NIX, etc),  Only us power users / geeks care and if you are a poweruser / geek, then you should not even consier thigns like WIndowsRT / 10S or any other limited OS provider. Lastly, since you can upgrade a 10S device to Pro. Well, you know.
  • Followed the steps, not working for me.
  • Neither does mine
  • This needs to be native in Windows
  • If you're trying this and the taskbar and notifications center isn't changing themes, do this in addition to what the article teaches: add a new action to the task that changes to dark. The argument will be "New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0 -Type Dword -Force", and the path is the same as the one in the article. In the task that changes themes to light: add a new action and instead of the one in the article put "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1" as the argument, and the path is the same as the one in the article. The rest of the settings, do as the article says, and things will work.