dbatools is a free PowerShell module with over 200 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-DbaTrigger

Get all existing triggers on one or more SQL instances.

Default output includes columns ComputerName, SqlInstance, Database, TriggerName, IsEnabled and DateLastMofied.

Screenshots

Examples

Returns a custom object displaying ComputerName, SqlInstance, Database, TriggerName, IsEnabled and DateLastMofied.

Get-DbaTrigger -SqlInstance ComputerA\sql987

Returns a custom object displaying ComputerName, SqlInstance, Database, TriggerName, IsEnabled and DateLastMofied from two instances.

Get-DbaTrigger -SqlInstance ‘ComputerA\sql987′,’ComputerB’

Returns a gridview displaying ComputerName, SqlInstance, Database, TriggerName, IsEnabled and DateLastMofied.

Get-DbaTrigger -SqlInstance ComputerA\sql987 | Out-Gridview

Returns a custom object displaying ComputerName, SqlInstance, Database, TriggerName, IsEnabled and DateLastMofied from two instances.

‘ComputerA\sql987′,’ComputerB’ | Get-DbaTrigger | Out-Gridview

Author

This command was created by Klaas Vandenberghe. You can find Klaas on Twitter and his blog.

Get-Help

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

Source Code

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

Related commands