Get-ODBCDsn PS Script



  • Luke Nichols


    It works locally because it is returning all of your user's ODBC connections. The PDQ Inventory scan user doesn't have any user connections, so the scanner can only see the system ODBC connections. That is probably why it's only returning data for some of the computers and not all of them-- you only get data back if there is a system ODBC connection.

    I also re-wrote your scanner slightly to test in my environment but if yours works for you then there is no need to change it. I did filter to DsnType of "System" since that's all you will get anyway:

    Get-ODBCDsn -DsnType System | ForEach-Object {
          Name = $_.Name
          DsnType = $_.DsnType
          Platform= $_.Platform
          DriverName= $_.DriverName

    Comment actions Permalink
  • David Sipp

    Makes Sense, Thanks. I need all this info so will look into registry searches.

    Comment actions Permalink

Please sign in to leave a comment.