Add-OdbcDsn

This topic contains 1 reply, has 2 voices, and was last updated by  Matt Howard 1 week, 2 days ago.

  • Author
    Posts
  • #83789

    iain Barnetson
    Participant

    I am trying to create new ODBC DSN connctions but untrrusted using a user name & password.
    I cant figure how to do that, cant find any documentation or articles with that demonstrated.
    Looking for some guidance, help or examples. Thanks.

    Ive used this to create the System DSN but of course no user name & pwd.

    Add-OdbcDsn -Name "SuiteCRM_DSN32_test" -DriverName "MySQL ODBC 5.2 Unicode Driver" -DsnType "System" -Platform "32-bit" -SetPropertyValue @("Server=xxx-sql-p01", "Trusted_Connection=No", "Database=suitecrm")
    
  • #83798

    Matt Howard
    Participant

    Have you tried using Get-Credential to prompt for the user and password values? Or alternatively using a stored SecureString value? Then you could add 'user=' and 'password=' with appropriate variables to the SetPropertyValue paramter.

You must be logged in to reply to this topic.