Overview
The Community Scripts collection offers PowerShell-based tools for:- Installing and managing the driver
- Changing display settings on-the-fly
- Toggling between display modes
- Automating resolution and refresh rate changes
- Enabling/disabling HDR
Prerequisites
PowerShell Modules
Many scripts depend on external PowerShell modules:- DisplayConfig (v1.1.1) - Display configuration management
- MonitorConfig (v1.0.3) - Monitor settings control
set-dependencies.ps1 script automatically installs these modules from the PowerShell Gallery.
Installing Dependencies
Run the dependency installer before using most scripts:Core Management Scripts
virtual-driver-manager.ps1
The comprehensive all-in-one management tool. This script handles the full driver lifecycle with automatic DevCon resolution and self-elevation.toggle-VDD.ps1
Quick enable/disable toggle. A lightweight script that enables or disables the Virtual Display Driver device.- Auto-elevates to administrator
- Detects current driver state (enabled/disabled)
- Toggles to opposite state
- No parameters required
silent-install.ps1
Automated silent installation. Fetches the latest driver from GitHub and installs it silently using NefCon.- Downloads NefCon installer utility
- Downloads the latest VDD release
- Extracts and installs driver certificates
- Silently installs the driver
- Cleans up temporary files
You can customize the driver version by editing the
$DriverURL parameter in the script.Display Configuration Scripts
changeres-VDD.ps1
Change virtual display resolution. Hot-swaps the resolution of the virtual display.-xres,-X,-HorizontalResolution: Width in pixels-yres,-Y,-VerticalResolution: Height in pixels
refreshrate-VDD.ps1
Change refresh rate. Sets the virtual display’s refresh rate to a validated value.rotate-VDD.ps1
Rotate display orientation. Rotates the virtual display to a specified angle.scale-VDD.ps1
Adjust DPI scaling. Sets or resets the DPI scaling percentage for the virtual monitor.The script automatically validates that your chosen scale doesn’t exceed the display’s maximum supported scale.
primary-VDD.ps1
Set as primary display. Makes the virtual display the Windows primary display.- Headless server setups
- Remote desktop scenarios
- Streaming configurations
Display Mode Scripts
HDRswitch-VDD.ps1
Toggle HDR mode. Switches between SDR (8-bit) and HDR (10-bit) color modes.- Automatically detects current color depth
- Switches from 8-bit to 10-bit (HDR) or vice versa
- Requires Windows 11 23H2+ for HDR support
winp-VDD.ps1
Toggle display projection mode. Switches Windows between Extend and Clone modes without touching the driver state.- Detects current mode (Extend or Clone)
- Toggles to opposite mode
- Useful for presentation scenarios
- Leaves virtual display enabled
Utility Scripts
get_disp_num.ps1
Get display adapter ID. Returns the numeric adapter ID for the VDD screen by scanning WMI for the custom monitor identifier.set-dependencies.ps1
Install required PowerShell modules. Ensures DisplayConfig and MonitorConfig modules are installed and imported.- Checks if PSGallery repository is available
- Sets it as trusted
- Installs DisplayConfig v1.1.1
- Installs MonitorConfig v1.0.3
- Imports both modules
- Saves modules for offline use
Usage Best Practices
Self-Elevation
Most scripts automatically request administrator privileges if not already running elevated. You’ll see a UAC prompt when needed.Automation and Scripting
For unattended automation:Error Handling
Scripts exit with appropriate codes:0= Success1= Error or failure
Script Location
All community scripts are available in the GitHub repository:Customization
All scripts are open source and can be modified to fit your needs:- Edit resolution lists
- Change default parameters
- Add custom validation
- Integrate with other tools
Troubleshooting
Execution Policy Errors
If PowerShell blocks script execution:Module Import Failures
If modules fail to import:- Run
set-dependencies.ps1to reinstall - Check internet connectivity (modules download from PSGallery)
- Manually install modules:
Device Not Found
If scripts report “Device not found”:- Ensure the driver is installed
- Verify the device name matches (“Virtual Display Driver” or “IddSampleDriver Device HDR”)
- Check Device Manager for any error states
Next Steps
Script Reference
Detailed reference for each PowerShell script
Manual Configuration
Manage the driver through Device Manager
Settings Overview
Configure driver behavior via XML files
Common Issues
Troubleshoot installation and runtime problems