Automatically enable Dark Theme on Windows 11/10

While you can always manually enable the Dark Theme via the Settings app, you can also use the Windows Task Scheduler to create a task that automatically enables and disable the dark Theme according to your parameters. To do so, you will have to use PowerShell and Task Scheduler. You need to create two PowerShell scripts and use them with Task Scheduler so that they can run as per your predefined time. Open Notepad and save the following two lines of code separately with .ps1 extension.

To enable Dark Mode:

To re-enable Light Mode:

After creating two separate .ps1 files, open Task Scheduler. Search for Task Scheduler in the Taskbar search box. Here, you have to create two different tasks. One task will be performed to enable the Dark theme, and another task will be conducted to re-enable the Light theme. Here, you have to create two different tasks. One task will be performed to enable the Dark theme, and another task will be conducted to re-enable the Light theme. After opening Task Scheduler, click on Create Basic Task to schedule a Basic Task. This should be visible on the right-hand side.

Enter a name of this task. Select Daily in the Trigger, and set date and time when you want to start and keep using the script. You need to select a time when you want to perform the task. After that, choose, After that, choose, Start a program in the Action section. On the next page, enter the following line in the Program/script path area;

Complete the wizard to its conclusion. Now, in the same way, you have to create another task to activate the Light Theme. One setback of this trick is it doesn’t work when your computer is shut down. For instance, let’s assume that you have selected 6 PM for enabling the Dark mode. If your computer is not turned on at 6 PM, this script won’t work or the task cannot be performed and the Dark theme won’t be enabled. TIP: This post will show you how to switch between Light and Dark Mode automatically using Auto Dark Mode X. If you like dark themes, you might want to take a look at these posts too: