Get-ODBCDsn PS Script

Comments

2 comments

  • Luke Nichols

    David,

    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:

    #ODBC
    Get-ODBCDsn -DsnType System | ForEach-Object {
       [PSCustomObject]@{
          Name = $_.Name
          DsnType = $_.DsnType
          Platform= $_.Platform
          DriverName= $_.DriverName
       }
    }

    1
    Comment actions Permalink
  • David Sipp

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

    0
    Comment actions Permalink

Please sign in to leave a comment.