# Run the following commands in an elevated PowerShell

To turn on CompactOS:

```powershell
Compact.exe /CompactOS:always
```

To turn off CompactOS:

```powershell
Compact.exe /CompactOS:never
```

To Query whether CompactOS is on or off:

```powershell
Compact.exe /CompactOS:Query
```

<br>

[Source](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/compact-os?view=windows-11)
