Controlling display output from the command line is useful in many enterprise scenarios — kiosk deployments, helpdesk automation, digital signage, or simply scripting your own monitor switching shortcuts. The built-in DisplaySwitch.exe tool handles all of this without any third-party software. This updated guide covers the current behaviour on Windows 11, including an important change to how switches work on newer builds.
| Detail | |
|---|---|
| Last Updated | March 2026 |
| Applies To | Windows 10, Windows 11 |
| Tool Used | DisplaySwitch.exe (built-in, no install required) |
| Difficulty | Beginner |
What is DisplaySwitch.exe?
DisplaySwitch.exe is a built-in Windows executable located at %SystemRoot%\System32\DisplaySwitch.exe. Running it without any arguments opens the same projection sidebar you get when pressing WIN + P on your keyboard — the familiar panel that lets you choose between PC screen only, Duplicate, Extend, and Second screen only.
When called with a switch or numeric argument, it applies the selected mode silently with no GUI — making it ideal for scripts, shortcuts, and automated deployments.

Important: Windows 11 Behaviour Change
On Windows 10 and early Windows 11 builds, DisplaySwitch.exe used text-based switches (/clone, /extend, etc.). Starting with Windows 11 22H2, some builds broke support for the text switches — the command would run without error but produce no effect. Microsoft later restored text switch support in a subsequent Windows 11 update, but the behaviour has been inconsistent across builds.
The safest approach in 2026 is to use the numeric arguments which work reliably on all Windows 10 and Windows 11 versions:
| Numeric Argument | Text Switch Equivalent | Description |
|---|---|---|
DisplaySwitch.exe 1 | /internal | PC screen only — disables external displays |
DisplaySwitch.exe 2 | /clone | Duplicate — mirrors primary display on all connected screens |
DisplaySwitch.exe 3 | /extend | Extend — extends the desktop across all connected displays |
DisplaySwitch.exe 4 | /external | Second screen only — disables the primary/internal display |
Basic Usage
Run from Command Prompt, PowerShell, or any script. No elevation required — DisplaySwitch.exe runs in user context.
Clone / Duplicate display (mirror primary to all screens)
# Recommended — works on all Windows 10 and 11 builds
DisplaySwitch.exe 2
# Alternative text switch — may not work on some Windows 11 builds
DisplaySwitch.exe /clone
Extend display across all monitors
DisplaySwitch.exe 3
PC screen only (disable external displays)
DisplaySwitch.exe 1
Second screen only (disable internal/primary display)
DisplaySwitch.exe 4
Practical Examples
Create a Desktop Shortcut for Quick Switching
Right-click the desktop → New → Shortcut, and enter the target as:
%SystemRoot%\System32\DisplaySwitch.exe 2
Name it “Clone Display” and optionally assign a keyboard shortcut in the shortcut properties. This is handy for users who frequently connect to projectors or TVs and need a one-click solution without navigating the WIN + P panel.
Toggle Between Clone and Extend via PowerShell Script
This script reads the last used mode from a state file and toggles between Clone and Extend on each run — useful as a keyboard shortcut or taskbar button:
# toggle-display.ps1 — toggle between Clone (2) and Extend (3)
$stateFile = "$env:TEMP\displaymode.txt"
if (Test-Path $stateFile) {
$lastMode = Get-Content $stateFile
} else {
$lastMode = "3" # Default to Extend if no state file
}
if ($lastMode -eq "3") {
$nextMode = "2"
Write-Host "Switching to: Clone"
} else {
$nextMode = "3"
Write-Host "Switching to: Extend"
}
Start-Process -FilePath "$env:SystemRoot\System32\DisplaySwitch.exe" -ArgumentList $nextMode
$nextMode | Out-File $stateFile
Kiosk / Digital Signage Deployment Script
A common use case is forcing Clone mode on kiosk or digital signage machines during startup — ensuring the display is always mirrored to the connected TV or screen regardless of what mode it was left in:
# Add to startup script or Intune PowerShell script (user context)
# Ensures Clone mode is always active at logon
Start-Sleep -Seconds 5 # Wait for display drivers to initialise after logon
Start-Process -FilePath "$env:SystemRoot\System32\DisplaySwitch.exe" -ArgumentList "2"
Write-Host "Display mode set to Clone."
Deploy this via Intune Platform scripts (run in user context, not SYSTEM — DisplaySwitch requires an active user session) or as a logon script via Group Policy.
Deploy via Batch File (.cmd)
For environments where PowerShell scripts are restricted or where a simple double-clickable file is preferable (e.g. teachers in a school environment), a .cmd file works equally well:
@echo off
echo Setting display to Clone mode...
%SystemRoot%\System32\DisplaySwitch.exe 2
echo Done.
Known Limitations
- No per-monitor targeting — DisplaySwitch.exe only applies global display modes. There is currently no officially supported API or command to target individual monitors (e.g. disable monitor 2 while keeping monitors 1 and 3 active). For per-monitor control you need third-party tools or the Win32 SetDisplayConfig API.
- Requires an active user session — DisplaySwitch.exe does not work in SYSTEM context. Scripts deploying it must run in the logged-on user’s context.
- No confirmation of success — the executable exits without returning a meaningful exit code. If you need to verify the current display mode programmatically, query the registry at
HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Connectivity. - Text switches unreliable on some Windows 11 builds — as described above, use numeric arguments (1–4) for consistent cross-version behaviour.
Summary
DisplaySwitch.exe remains the simplest built-in tool for scripted display mode switching on Windows 10 and 11. Use numeric arguments (1–4) rather than text switches to ensure compatibility across all Windows 11 builds, and always run it in user context rather than SYSTEM.
DisplaySwitch.exe 1— PC screen onlyDisplaySwitch.exe 2— Clone / DuplicateDisplaySwitch.exe 3— ExtendDisplaySwitch.exe 4— Second screen only- For kiosk deployments, run via Intune Platform script in user context with a short startup delay
