Created
April 10, 2024 16:53
-
-
Save imjosh/9abb019d919d437a4fbce27c68571d93 to your computer and use it in GitHub Desktop.
Enumerate Windows Data Providers/Drivers with PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run in 32/64-bit powershell for 32/64bit providers/drivers | |
foreach ($provider in [System.Data.OleDb.OleDbEnumerator]::GetRootEnumerator()) | |
{ | |
if ($provider.GetValue(0) -like "*") | |
{ | |
$v = New-Object PSObject | |
Add-Member -in $v NoteProperty "Provider Name" $provider.GetValue(0) | |
Add-Member -in $v NoteProperty "Description" $provider.GetValue(2) | |
$v | |
} | |
} | |
# Notes: | |
# https://www.connectionstrings.com/ | |
# Create a blank text file named temp.udl and open it. Configure the data link and close. Open the file in a text editor. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment