locked
change status on a template with powershell RRS feed

  • Question

  • Does anyone know how to change a service request template status with powershell? I am able to update the status on  class instances (work items), but not on a template.

    There is a Set-objecttemplate cmdlet, but can't seem to do it the regular way you would with a normal work item:

    $ir = Get-SCClassInstance -Class (Get-SCClass -name System.workItem.Incident) -Filter "name -eq IR453"; $ir.status = "Resolved"; Update-
    SCClassInstance $ir}


    Thursday, February 7, 2013 8:50 PM

Answers

  • My apologies, my late night forum'ing missed a cricital word in your question!

    • Marked as answer by Morten Meisler Saturday, February 9, 2013 10:44 PM
    Friday, February 8, 2013 7:42 PM

All replies

  • Thanks. But this will, as far as I can see, set the template based on another template no? My challenge is to make a whole new template where status = "Completed". 

    I could probably just do it with some Management Pack XML edit, I just wanted a more easier solution (if possible) otherwise I'll do the MP editting

    Friday, February 8, 2013 8:11 AM
  • My apologies, my late night forum'ing missed a cricital word in your question!

    • Marked as answer by Morten Meisler Saturday, February 9, 2013 10:44 PM
    Friday, February 8, 2013 7:42 PM
  • np, nice blog you got, I've bookmarked it.

    I'll do it via MP editting and maybe do a how-to blogpost about it ; )

     
    Saturday, February 9, 2013 10:44 PM