locked
Is it possible to have a powershell script trigger an email notification/subscription? RRS feed

  • Question

  • Is it possible to have powershell trigger a subscription or notification template?

    SCSM 2012, Smlets, Poshv2


    Joshua Fuente

    Wednesday, January 9, 2013 2:26 AM

Answers

All replies

  • What is the end goal for this or the requirement for this, 

    Perhaps a solution exists already.

    F.


    As long as you learn something new every day, the day is not wasted.

    Thursday, January 10, 2013 9:37 AM
  • The issue is that we have many notification templates, but working with the triggers for the subscriptions is somewhat difficult.  And I can't seem to get to various fields to trigger off them... Working with Dates in the trigger is a real pain. 

    I feel I could more easily write the trigger I want in Powershell.

    It would be nice if I could leverage the templates that have already been created. Rather than sending the email through powershell.

    I already have WF scripts that run to change the status of the CR, it would be nice if I can add a few lines in to also trigger emails as needed.


    Joshua Fuente

    Thursday, January 10, 2013 1:38 PM
  • Can you write example of any triggers what you can't implement with SCSM?
    What do you mean by "Working with Dates in the trigger is a real pain"? Can you give some examples?

    About subject - NO. You can trigger workflow (notification is workflow) only by:

    1. Event of object created, updated or deleted
    2. Scheduler

    SCSMSolutions
    email: freemanru (at) gmail (dot) com

    Tuesday, January 15, 2013 1:49 AM
  • Some of the trouble I have had are things like,

    When a date field goes from Null to Not Null, or when a date field changes. (particularly after the CR is in approved status)

    When a date field has "past" (Now).

    When a user field (people picker from domain) is changed. (from one user to another)

    Those are 2 I can think of right now.


    Joshua Fuente

    Wednesday, January 16, 2013 4:31 AM
    • Marked as answer by NachoScript Wednesday, February 13, 2013 12:21 AM
    Wednesday, January 16, 2013 5:25 AM
  • I maybe have a sample workflow which can't be created by the GUI nor by XML hacking :)

    Please see this thread: http://social.technet.microsoft.com/Forums/en-US/administration/thread/ca7cbb07-76af-41ad-84c1-ef541fcbd746

    I'd also like to be able to trigger the SendNotificationsActivity workflow with my own parameters. Better yet, if that would be possible via PowerShell - that would be pure sugar for me :)

    Thanks
    Alex

    • Marked as answer by NachoScript Wednesday, February 13, 2013 12:21 AM
    Wednesday, January 16, 2013 10:10 AM
  • Some of the trouble I have had are things like,

    When a date field goes from Null to Not Null, or when a date field changes. (particularly after the CR is in approved status)

    When a date field has "past" (Now).

    When a user field (people picker from domain) is changed. (from one user to another)

    Those are 2 I can think of right now.


    Joshua Fuente


    All of this can be done with XML editing.

    SCSMSolutions
    email: freemanru (at) gmail (dot) com

    • Marked as answer by NachoScript Wednesday, February 13, 2013 12:22 AM
    Wednesday, January 16, 2013 5:55 PM