In this recipe, we will extract the contents of a trace (
.trc) file using PowerShell.
We will need to use the x86 Version of PowerShell and/or PowerShell ISE for this recipe. This is unfortunate, but some of the classes that we need to use are only supported in 32-bit mode.
In this recipe, we will use a previously saved trace (
.trc) file. Feel free to substitute this with a trace file that is available.
Let's take a look at how we can extract the contents of a trace file:
#import SQL Server module Import-Module SQLPS -DisableNameChecking