Summary: Learn how to enable and disable a collection of ODBC performance counter settings for troubleshooting.
How can I use Windows PowerShell to enable the ODBC performance counters, run commands in a script, and then disable the counters?
You can store a returned object for later use when you enable the performance counters by using the -PassThru parameter, for example:
$perfCounter = Enable-OdbcPerfCounter -Platform 32-bit -PassThru
<Execute some ODBC applications that are using ODBC pooling>
Disable-OdbcPerfCounter $perfCounter