dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaTraceFile

This function returns a list of Trace Files on a SQL Server Instance and identify the default Trace File.

Screenshots

dbatools-Get-DbaTraceFile

Examples

Lists all the tracefiles on the sql2016 SQL Server.

Get-DbaTraceFile -SqlInstance sql2016

Lists the default trace information on the sql2016 SQL Server.

Get-DbaTraceFile -SqlInstance sql2016 -Default

Author

This command was created by Garry Bargsley. You can find Garry on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaTraceFile -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaTraceFile.ps1 on GitHub
 

Related commands