Creating an ODBC connection

With Powershell 4 on Windows 8 and 2012, they've improve the support for ODBC connections. You just need to import the Wdac module to be able to use the different ODBC functions. Get-Command *ODBC* shows the following functions: Add-OdbcDsn Disable-OdbcPerfCounter Enable-OdbcPerfCounter Get-OdbcDriver Get-OdbcDsn Get-OdbcPerfCounter Remove-OdbcDsn Set-OdbcDriver Set-OdbcDsn For instance, if you were to create a … Continue reading Creating an ODBC connection

Quick command to open explorer from the current directory in Powershell

Here is a quick command if you want to open Windows Explorer from the current directory in Powershell: ii . (note the space between the 'i' and the dot) ii is powershell's alias for invoke-item. Adding a dot to that command will open the current directory using the default explorer. Edit: If you'd like to … Continue reading Quick command to open explorer from the current directory in Powershell

Run a powershell script if the computer contains the correct powershell version

Several times I encountered that a computer I was running my scipt on, didn't support a certain parameter or a certain command because it didn't have Powershell 4 installed. Thus I thought it would be time to create a default error-handling for each of my scripts which checks if the computer runs the correct Powershell … Continue reading Run a powershell script if the computer contains the correct powershell version