![powershell informix odbc driver powershell informix odbc driver](https://www.cdata.com/kb/articles/odbc-excel-query-1.png)
POWERSHELL INFORMIX ODBC DRIVER SOFTWARE
Authorized hardware may consist of physical computers or virtual machines.Īuthorized Locations: The software licensed under this agreement may be installed and used on authorized computers (see above)in the United States. The software may not be used on any government owned or leased machines, or at a government owned or leased facility, or otherwise for the benefit of any federal, state, local or foreign government or governmental agency. SAS software for server operating systems may only be installed and run on Duke-owned or leased server computers located on Duke premises.
![powershell informix odbc driver powershell informix odbc driver](https://image.slidesharecdn.com/powershell-reporting-sharepoint-131107074428-phpapp02/95/improve-powershell-reporting-using-sharepoint-lists-for-results-8-638.jpg)
SAS licenses expire annually on June 30.Īuthorized Use: SAS software licensed under this agreement may only be installed and accessed by currently-registered Duke students and faculty, Duke employees, and onsite contractors while doing work in the authorized locations specified below for Duke purposes.Īuthorized Hardware: The software may only be installed on computers that are owned or leased by Duke or on computers personally-owned by Duke employees, currently-registered Duke students and faculty. If (-NOT (::GetCurrent()).SAS software licenses are available at no cost to the Duke community through a grant from SAS to NCICU. Make sure to edit the variables to match your environment.
POWERSHELL INFORMIX ODBC DRIVER PASSWORD
To allow for this create a PS1 file as follows and save it in the same location at your password files. The issue is that PowerShell needs to run as the local Administrator to create an ODBC connection. The basics of creating an ODBC connection are rather simple as indicated at the beginning of this post. I then moved them in the network folder I created as indicated above. By default the script saves the files on the root of C. I used this site as a reference to create the 256-bit key and password files. I needed this solution to be hands off so I wanted a way to store the username/password somewhat securely as it was used by the scripts. Before going further create a folder (in my case it was a network accessible folder) to hold all these related files in. The solution uses a 256-bit AES key/password file, and two script files as outlined below. This may not be the most elegant or secure solution, but it works for what I need it to do. You can’t just run PowerShell as a different user because ODBC requires PowerShell to be elevated. Add-OdbcDsn wouldn’t take credentials and the old command line dbdsn command is deprecated at this point. Looking around the internet the consensus seemed to be that it wasn’t possible. I needed to create the ODBC connection as a specific user. This might be fine if said user has access to the database but is a bit of a problem if said user does not. Running the PowerShell as above it creates the connection as the logged in user running the script. The problem comes in when you want to create the ODBC connection as a specific user. $OdbcDriver = Get-OdbcDriver -Name SQL -Platform 32-bitĪdd-OdbcDsn -Name $odbcname -DriverName $OdbcDriver.Name -Platform 32-bit -DsnType System -SetPropertyValue "Trusted_Connection=Yes","Database=$sqldb")