Documentation Index
Fetch the complete documentation index at: https://mintlify.com/VirtualDrivers/Virtual-Display-Driver/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thetoggle-VDD.ps1 script provides a quick way to toggle the Virtual Display Driver between enabled and disabled states. It’s a lightweight alternative to the full virtual-driver-manager.ps1 when you only need to quickly enable or disable the driver.
Features
- Simple toggle: One command to switch between enabled/disabled
- Automatic elevation: Self-elevates to Administrator privileges if needed
- Status detection: Automatically detects current state and performs opposite action
- Device search: Finds driver by friendly name with fallback options
Requirements
- Virtual Display Driver must be installed
- PowerShell 5.1 or later
- Administrator privileges (auto-elevation enabled)
Parameters
This script takes no parameters. Simply run it to toggle the driver state.Usage Examples
Basic Toggle
- If driver is enabled: Disable it
- If driver is disabled: Enable it
Run from Command Prompt
Create Desktop Shortcut
- Right-click on desktop and select “New > Shortcut”
- Enter this as the target:
- Name it “Toggle Virtual Display”
- Right-click the shortcut, select “Properties”
- Click “Advanced” and check “Run as administrator”
How It Works
1. Self-Elevation Check
The script first checks if it’s running with Administrator privileges:- Script relaunches itself with UAC prompt
- Original process exits
- Elevated process continues execution
2. Device Discovery
Searches for the Virtual Display Driver device:IddSampleDriver Device HDR(legacy name)Virtual Display Driver(current name)
3. State Detection and Toggle
Checks the current device status and performs the opposite action:- Status = ‘OK’: Device is enabled → Disable it
- Any other status: Device is disabled or in error state → Enable it
Script Source
Here’s the complete script:Output Messages
Success Messages
Warning Messages
Troubleshooting
Device Not Found Warning
Cause: Virtual Display Driver is not installed. Solution:UAC Prompt Appears Every Time
This is expected behavior. The script requires Administrator privileges to enable/disable hardware devices. Options:- Accept the UAC prompt (recommended for security)
- Create a scheduled task that runs with elevated privileges
- Use the virtual-driver-manager.ps1 with
-Silentflag for automation
Script Doesn’t Execute
Cause: PowerShell execution policy blocks the script. Solution:Multiple Displays Found
If you have multiple display devices with matching names, the script will use the first match. This is typically not an issue as the Virtual Display Driver has unique friendly names.Automation Examples
Batch File Toggle
Createtoggle-vdd.bat:
Keyboard Shortcut
- Create a batch file as shown above
- Create a shortcut to the batch file
- Right-click shortcut → Properties
- Set “Shortcut key” (e.g., Ctrl+Alt+V)
- Set “Run” to “Minimized”
- Click “Advanced” and check “Run as administrator”
Toggle from Another Script
Task Scheduler Integration
Create a scheduled task to toggle the driver:Comparison with virtual-driver-manager.ps1
| Feature | toggle-VDD.ps1 | virtual-driver-manager.ps1 |
|---|---|---|
| Toggle driver | Yes | Yes (with -Action toggle) |
| Install/Uninstall | No | Yes |
| Check status | No | Yes |
| JSON output | No | Yes |
| Silent mode | No | Yes |
| File size | ~1 KB | ~20 KB |
| Dependencies | None | Internet for install/uninstall |
| Best for | Quick toggles | Full management |
toggle-VDD.ps1 when:
- You only need to enable/disable the driver
- You want a simple, fast script
- You don’t need automation features
virtual-driver-manager.ps1 when:
- You need to install or uninstall the driver
- You want JSON output for automation
- You need status checking
- You want silent/verbose modes
Credits
Script submitted by zjoasan.Related Scripts
- virtual-driver-manager.ps1 - Comprehensive driver management
- changeres-VDD.ps1 - Change display resolution
- HDRswitch-VDD.ps1 - Toggle HDR mode
- primary-VDD.ps1 - Set as primary display