I would like to use smo and powershell script to out a trigger that is attached to a table .
I have found a way to script out the table with the trigger but this is not what,I also wont always know the name of the table the trigger is connected to ,I would just know the trigger name .
I want to give the script the name of the trigger and have it script it out.
I have been looking for a way to do this and have had no luck.
Thanks for your help as always.
Here’s an example using sqlps: