Automatically re-enable your eGPU after hot-plugging on Windows
Never manually enable your eGPU from Device Manager again! This tool monitors your external GPU and automatically enables it whenever you reconnect it after safe-removal.
When using an external GPU (eGPU) via Thunderbolt/USB-C on Windows:
- You "safely remove" it using NVIDIA Control Panel (or Device Manager)
- You physically disconnect the eGPU
- When you plug it back in... it stays disabled
- You have to manually open Device Manager and enable it every time
This tool runs silently in the background and:
- Detects when you safe-remove your eGPU
- Waits for you to unplug and replug it
- Automatically enables it when reconnected!
- Intelligent Power Management:
- Switches to custom "eGPU High Performance" power plan when connected
- Disables display sleep when using external monitors
- Prevents lid-close sleep on laptops (configurable)
- Restores all settings to your preferences when disconnected
- Crash recovery - automatically restores settings even if script crashes
- Shows Windows notifications for all important events
- Checks for updates daily and notifies you
- Logs all activity with automatic rotation (max 500 KB)
Run this command in PowerShell as Administrator:
irm https://raw.githubusercontent.com/Bananz0/eGPUae/main/Install-eGPU-Startup.ps1 | iex-
Download both files:
-
Run the installer as Administrator:
.\Install-eGPU-Startup.ps1
-
Select your eGPU from the list
-
Configure power management preferences:
- Display timeout duration (or use system default)
- Lid close action when eGPU disconnected (Do Nothing/Sleep/Hibernate/Shut Down)
-
Done! It will start automatically on every boot with your custom settings.
- Windows 10/11
- PowerShell 7+ (Download here)
- Administrator privileges (needed to enable/disable devices)
- An external GPU connected via Thunderbolt or USB-C
-
Safe-remove your eGPU
- Use NVIDIA Control Panel → "Safely remove GPU"
- Or Device Manager → Right-click GPU → Disable
-
Physically unplug the eGPU
- Disconnect the Thunderbolt/USB-C cable
-
Do whatever you need to do
-
Plug the eGPU back in
- The script automatically detects it and enables it!
- No manual intervention needed!
The script tracks your eGPU through three states:
- ✓ present-ok - eGPU is connected and working
- ⊗ present-disabled - eGPU is safe-removed (waiting for unplug)
- ○ absent - eGPU is physically unplugged
pwsh "$env:USERPROFILE\.egpu-manager\eGPU.ps1"Start-ScheduledTask -TaskName "eGPU-AutoEnable"Stop-ScheduledTask -TaskName "eGPU-AutoEnable"irm https://raw.githubusercontent.com/Bananz0/eGPUae/main/Install-eGPU-Startup.ps1 | iex
# Choose option [1] Reconfigure# View last 50 log entries
Get-Content "$env:USERPROFILE\.egpu-manager\egpu-manager.log" -Tail 50
# Open log folder
explorer "$env:USERPROFILE\.egpu-manager"# Download and run with -Uninstall flag
irm https://raw.githubusercontent.com/Bananz0/eGPUae/main/Install-eGPU-Startup.ps1 -OutFile "$env:TEMP\Install-eGPU-Startup.ps1"
pwsh "$env:TEMP\Install-eGPU-Startup.ps1" -UninstallOr if you have the file locally:
.\Install-eGPU-Startup.ps1 -UninstallC:\Users\YourName\.egpu-manager\
├── eGPU.ps1 # Monitor script
├── egpu-config.json # Your eGPU configuration & power preferences
├── runtime-state.json # Crash recovery state (auto-managed)
├── egpu-manager.log # Activity log (auto-rotates at 500 KB)
└── egpu-manager.old.log # Previous log backup
- Name:
eGPU-AutoEnable - Trigger: At system startup (10 second delay)
- Runs as: Your user account with elevated privileges
- Hidden: Yes (runs silently in background)
- Monitoring: The script polls your eGPU status every 2 seconds
- Detection: It detects state changes:
- Safe-removal via NVIDIA Control Panel
- Physical disconnection
- Physical reconnection
- Auto-Enable: When reconnected while disabled, it uses
pnputil /enable-device(the same command Windows Device Manager uses internally) - Verification: Confirms the device is actually working after enabling
- Uses
Get-PnpDeviceto query device state - Tracks transitions between
present-ok,present-disabled, andabsent - Only triggers auto-enable after a full unplug/replug cycle (not just on disable)
- Uses
pnputil.exefor maximum reliability (same as Device Manager)
A: Yes! The script works with any external GPU. Just select your eGPU during installation.
A: Yes, as long as you have Thunderbolt or USB-C with eGPU support.
A: Yes! All state changes and actions are logged to egpu-manager.log. The log automatically rotates when it reaches 500 KB, keeping only the last 1000 lines to prevent it from growing indefinitely.
A:
# View logs
Get-Content "$env:USERPROFILE\.egpu-manager\egpu-manager.log" -Tail 50
# Open folder
explorer "$env:USERPROFILE\.egpu-manager"A: The script checks for updates automatically once per day and shows a Windows notification if a new version is available. To update, simply run the installer again:
irm https://raw.githubusercontent.com/Bananz0/eGPUae/main/Install-eGPU-Startup.ps1 | iexYour configuration will be preserved.
A: Yes! The script shows a Windows toast notification whenever it successfully enables your eGPU, so you'll see a popup even if it's running in the background.
A: When your eGPU connects:
- Switches to a custom "eGPU High Performance" power plan (max CPU, PCIe, no USB suspend)
- Disables display sleep if external monitors detected
- Sets lid close action to "Do Nothing" (prevents accidental sleep on laptops)
When disconnected, everything restores to your configured preferences automatically.
A: The script has built-in crash recovery! It saves the original settings to runtime-state.json. When restarted, it detects the eGPU is disconnected and automatically restores your preferred settings. Reboots with eGPU connected are handled intelligently and won't trigger false restorations.
A: Yes! During installation, you can configure:
- Display timeout duration (in minutes, or keep system default)
- Lid close action when eGPU is disconnected (Do Nothing/Sleep/Hibernate/Shut Down)
To change these later, run the installer again and select "Reconfigure".
A: Currently supports one eGPU. For multiple eGPUs, you can modify the config or run multiple instances with different configs.
A: No. It only polls every 2 seconds and uses minimal resources. The task runs hidden in the background.
A: Yes:
Stop-ScheduledTask -TaskName "eGPU-AutoEnable"To re-enable:
Start-ScheduledTask -TaskName "eGPU-AutoEnable"A:
- Make sure you're running PowerShell as Administrator
- Check Task Scheduler to see if the task exists
- Try running the monitor manually to see error messages:
pwsh "$env:USERPROFILE\.egpu-manager\eGPU.ps1" - Open an issue on GitHub
- Right-click PowerShell → "Run as Administrator"
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass- Make sure your eGPU is plugged in and working
- Check Device Manager → Display adapters to see if Windows recognizes it
- Check if the task is running:
Get-ScheduledTask -TaskName "eGPU-AutoEnable"
- View task history in Task Scheduler (
taskschd.msc) - Run the monitor manually to see live output
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
MIT License - feel free to use, modify, and distribute!
Created to solve the annoying eGPU hot-plug workflow on Windows.
Inspired by the frustration of opening Device Manager every single time after a long uni study session
If this tool saved you time, consider giving it a star!
It helps others discover this solution and motivates further development.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ for the eGPU community