Skip to content

Instantly share code, notes, and snippets.

@zippy1981
Created August 23, 2011 10:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zippy1981/1164836 to your computer and use it in GitHub Desktop.
Save zippy1981/1164836 to your computer and use it in GitHub Desktop.
Enumerates through the registry to list OleDb providers.
# 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("");
};
}
};
@sumitkute
Copy link

Thanks this really helped me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment