🚀 What this does
This kit:
- Saves all ODBC drivers, DSNs, and registry settings
- Builds a single .zipbackup package
- Automatically lists vendor download links (Microsoft, Oracle, MySQL, PostgreSQL, etc.)
- Recreates everything on a new computer in one click
🖥️ Requirements
- Windows 10 or 11
- Administrator permissions
- PowerShell 5.1 or higher
🧰 Files Included
| File | Purpose | 
|---|---|
| export-ODBC.ps1 | Run this on the old computer to export settings | 
| restore-ODBC.ps1 | Run this on the new computer to import everything | 
| ODBC_Backup.zip | The automatically created backup package | 
| ODBC_Migration_Report.md | Report with driver download links | 
📤 Step 1 — Backup (Old Computer)
- 
Create a new folder anywhere on your computer, for example: 
 C:\ODBC_Migration_Scripts
- 
Save both of these files into that folder: - export-ODBC.ps1
- restore-ODBC.ps1
 
- 
Right-click the folder in File Explorer and choose: 
 “Open in Terminal” or “Open PowerShell window here”
- 
In the PowerShell window that opens, type: .\export-ODBC.ps1(If PowerShell asks about permissions, allow it by typing Ywhen prompted.)
- 
When the script finishes, you’ll see a message like: Export complete. ZIP created at: C:\ODBC_Migration\ODBC_Backup.zip
- 
Open C:\ODBC_Migrationand verify that the fileODBC_Backup.zipexists and is larger than 1 MB.
- 
Copy that ODBC_Backup.zipfile to a USB drive or cloud folder.
🟢 Tip:
Running the script this way keeps the PowerShell window open —
so if anything goes wrong, you’ll see the exact error message.
📥 Step 2 — Restore (New Computer)
- 
On the new computer, create a folder again (e.g. C:\ODBC_Migration_Scripts)
 and place both files inside:- export-ODBC.ps1
- restore-ODBC.ps1
 
- 
Copy your ODBC_Backup.zipfile from the old computer into:C:\ODBC_Migration\
- 
Right-click the script folder → choose “Open in Terminal” 
 or “Open PowerShell window here”
- 
In the PowerShell window, type: .\restore-ODBC.ps1
- 
The script will: - Extract your backup
- Import registry settings
- Recreate DSNs
- List missing drivers (with download links)
 
🟢 Tip:
You can safely run the restore-ODBC.ps1 script more than once — it won’t overwrite or damage anything.
Keep the PowerShell window open until the script finishes —
you’ll see messages like “Added DSN…” or “Missing ODBC Drivers Detected.”
📊 Step 3 — View the Migration Report
After you finish restoring, a detailed report is automatically created:
C:\ODBC_Migration\restore\ODBC_Migration_Report.md
You can open this file in:
- Notepad (Right-click → “Open with Notepad”)
- Or a Markdown viewer (like Typora, Obsidian, or Visual Studio Code)
This report shows every driver that was backed up and whether it’s installed on your new PC.
Example section from the report:
| ODBC Driver | Platform | Version | Product | Publisher | Download Link | 
|---|---|---|---|---|---|
| ODBC Driver 18 for SQL Server | 64-bit | 18.2.1.1 | Microsoft ODBC Driver 18 for SQL Server | Microsoft | Download | 
| MySQL ODBC 8.0 Unicode Driver | 64-bit | 8.0.36 | Oracle | Download | 
💾 Step 4 — Install Missing Drivers on the New PC
If the restore window or report says “Missing ODBC Drivers Detected”, do this:
- Open the ODBC_Migration_Report.mdfile
- Look for any drivers with “Download” links
- Click the link — it will open the official vendor website
- Download and install the driver that matches your system (64-bit or 32-bit)
🟢 Common examples:
- SQL Server → “Microsoft ODBC Driver 18 for SQL Server”
- MySQL → “MySQL Connector/ODBC”
- PostgreSQL → “psqlODBC”
- SQLite → “SQLite ODBC Driver”
- 
When installing drivers, right-click the installer and choose “Run as Administrator.” 
- 
Once installed, run the restore-ODBC.ps1script again.\restore-ODBC.ps1This will recheck the system and add any DSNs that couldn’t be created earlier. 
🧪 Step 5 — Verify the Restored DSNs
- 
Press Windows + R, type: odbcad32.exe
- 
Open both: - 64-bit ODBC Administrator: C:\Windows\System32\odbcad32.exe
- 32-bit ODBC Administrator: C:\Windows\SysWOW64\odbcad32.exe
 
- 64-bit ODBC Administrator: 
- 
Check that your DSNs appear under: - User DSN and/or System DSN
 
✅ If you see your DSNs listed under “System DSN,” you’re done!
🧹 Step 6 — Optional Cleanup
Once everything is working:
- Delete the folder C:\ODBC_Migration_Scripts
- Move ODBC_Backup.zipto a safe backup location (USB drive, NAS, or cloud storage)
📦 Files Created During Backup
C:\ODBC_Migration\
 ├── ODBC_Backup.zip
 ├── export_log.txt
 ├── export\
 │   ├── ODBC_Migration_Report.md
 │   ├── odbc_driver_product_map.csv
 │   ├── odbc_installer_hits.csv
 │   ├── odbc_drivers.csv
 │   ├── odbc_dsns.xml
 │   ├── ODBC_System.reg
 │   ├── ODBC_User.reg
 │   └── ODBC_System32.reg
🛠️ Troubleshooting
| Issue | Fix | 
|---|---|
| PowerShell says “script execution disabled” | Open PowerShell as admin → Set-ExecutionPolicy RemoteSigned | 
| ZIP not created | Ensure there’s enough space on C:\and that PowerShell ran as admin | 
| Missing driver link says “Search manually” | Use the Markdown report to see full list of known download sites | 
| Restore errors out | Run again after installing missing drivers | 
🧑💻 Technical Details (for advanced users)
- Uses Get-OdbcDsn,Get-OdbcDriver, and registry exports
- Detects installed products from HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall
- Generates CSV and Markdown reports with official vendor links
- Compressed using Compress-Archivebuilt into PowerShell
- Logs stored in C:\ODBC_Migration
🧡 Credits
Created by Gene Amos for easy ODBC migration between home or work PCs.
Licensed under MIT.
Feel free to fork and improve.
