Add-OdbcDsn

Welcome Forums General PowerShell Q&A Add-OdbcDsn

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
1 year ago.

  • Author
    Posts
  • #83789

    Participant
    Points: 35
    Rank: Member

    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

    Participant
    Points: 27
    Rank: Member

    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.

The topic ‘Add-OdbcDsn’ is closed to new replies.