# How to Change Windows 11 to Dark theme from CLI?

I'm running windows 11 on a virtual machine to do few tests and I wanted to change the theme but in order to do that you need to activate your copy of Windows.

I don't think it's feasible to buy a license to test few things in a virtual machine.

If you are in the same situation as me and hate light mode because it hurts your eyes, here is a single command to change the system theme to dark.

### Step 1: Open Windows Powershell

Click the start button or press Window key, then type powershell and click Window Powershell

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1737407308281/ba19aeab-d024-484a-b585-7f8942d6ead5.png align="center")

### Step 2: Copy Command to Powershell

Paste the command below in the Powershell Window and press Enter to run the command.

```powershell
rundll32.exe themecpl.dll,OpenThemeAction C:\Windows\resources\themes\dark.theme
```

### Changed your mind?

If you don't want this theme and need to use a different one, check the available themes using this command:

```powershell
dir C:\Windows\resources\themes\*.theme
```

Then replace the last part of the previous command `dark.theme` with whatever theme you want. For example, you want to use themeC.theme instead:

```powershell
rundll32.exe themecpl.dll,OpenThemeAction C:\Windows\resources\themes\themeA.theme
```

NOTE: You might need to restart and rerun the command for changes to take effect.
