Created
August 23, 2011 10:48
-
-
Save zippy1981/1164836 to your computer and use it in GitHub Desktop.
Enumerates through the registry to list OleDb providers.
This file contains 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
# Based Loosely on this VB script using a commercial ActiveX object to interrogate the registry. | |
# http://www.motobit.com/help/regedit/sa117.htm | |
Get-ChildItem HKLM:\SOFTWARE\Classes\CLSID | ForEach-Object { | |
$regKey = $_; | |
if ($regKey.GetValue('OLEDB_SERVICES') -ne $null -and $regKey.OpenSubKey("OLE DB Provider") -ne $null) { | |
New-Object PSObject -Property @{ | |
'Key' = $regKey.GetValue(""); | |
'OLEDBProvider' = $regKey.OpenSubKey("OLE DB Provider").GetValue(""); | |
}; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks this really helped me