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


Gets SQL Security Audit Specification information for each instance(s) of SQL Server.


To return all Security Audit Specifications on the local default SQL Server instance.

Get-DbaAuditSpecification -SqlInstance localhost

To return all Security Audit Specifications for the local and sql2016 SQL Server instances.

Get-DbaAuditSpecification -SqlInstance localhost, sql2016


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


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

Source Code

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

Related commands