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


Read-DbaAuditFile

Read Audit details from a sqlaudit file.

Screenshots

dbatools-Read-DbaAuditFile

Examples

Returns events from C:\temp\logins.sqlaudit.

Read-DbaAuditFile -Path C:\temp\logins.sqlaudit

Returns events from all .sqlaudit files in C:\temp\audit.

Get-ChildItem C:\temp\audit*.sqlaudit | Read-DbaAuditFile

Reads remote Audit details by accessing the file over the admin UNC share.

Get-DbaServerAudit -SqlInstance sql2014 -Audit LoginTracker | Read-DbaAuditFile

Author

This command was created by Chrissy LeMaire. You can find Chrissy on Twitter.

Get-Help

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

Source Code

Want to see the source code? View Read-DbaAuditFile.ps1 on GitHub
 

Related commands