ÿþ<html> <head> <title>Get-SqlTrigger</title> </head> <body> <h1>Get-SqlTrigger</h1> <div>Gets an SMO Trigger object.</div> <h2> Syntax </h2> <code>Get-SqlTrigger [-smo] &lt;Object&gt; [[-name] &lt;String&gt;] [&lt;CommonParameters&gt;]</code> <h2> Detailed Description </h2> <div> The Get-SqlTrigger function gets a collection of SMO Trigger objects for the specified smo object. </div> <h2> Related Commands </h2> <div> * <a href='Get-SqlTrigger.htm'>Get-SqlTrigger</a><br/> </div> <h2> Parameters </h2> <table border='1'> <tr> <th>Name</th> <th>Description</th> <th>Required?</th> <th>Pipeline Input</th> <th>Default Value</th> </tr> <tr valign='top'> <td>smo&nbsp;</td> <td>&nbsp;</td> <td>true&nbsp;</td> <td>true (ByValue)&nbsp;</td> <td>&nbsp;</td> </tr> <tr valign='top'> <td>name&nbsp;</td> <td>&nbsp;</td> <td>false&nbsp;</td> <td>false&nbsp;</td> <td>&nbsp;</td> </tr> </table> <h2> Input Type </h2> <div>Microsoft.SqlServer.Management.Smo.Database or Microsoft.SqlServer.Management.Smo.Server or Microsoft.SqlServer.Management.Smo.Table or Microsoft.SqlServer.Management.Smo.View You can pipe SMO objects to Get-SqlTrigger</div> <h2> Return Values </h2> <div>Microsoft.SqlServer.Management.Smo.Trigger or Microsoft.SqlServer.Management.Smo.DatabaseDdlTrigger or Microsoft.SqlServer.Management.Smo.ServerDdlTrigger Get-SqlTrigger returns a Microsoft.SqlServer.Management.Smo.Trigger/DatabaseDdlTrigger/ServerDdlTrigger object.</div> <h2> Notes </h2> <div>Additional properties including the database, server and extended properties are included in the output. The output type depends on whether a server, database or table/view object is passed to the smo parameter.</div> <h2> Examples </h2> <h3> EXAMPLE 1</h3> <pre>Get-SqlDatabase "Z002\sql2K8" "pubs" | Get-SqlTrigger -name tr_MStran_alterview</pre> <div>This command gets the SMO database Trigger, tr_MStran_alterview for SQL Server Z002\SQL2K8, AdventureWorks database.</div> <h3> EXAMPLE 2</h3> <pre>Get-SqlDatabase "Z002\sql2K8" pubs | Get-SqlTable | Get-SqlTrigger</pre> <div>This command gets a collection of SMO Trigger objects for all user tables in the pubs database.</div> </body> </html>