none
Target Resolution Time - ByTarget = Null

    Question

  • I have configured an Orchestrator runbook following the excellent guide that Marcel put together - http://blog.scsmfaq.ch/2012/05/19/more-transparency-in-slo-management-by-reusing-the-target-resolution-time-field/

    I'm getting error message in Orchestrator "Cannot bind argument to parameter 'ByTarget' because it is null."I

    My Powershell code is as follows:

    $SMDefaultComputer = “SCSMFQDN"
    $SLAID = "\`d.T.~Ed/{5B427F66-6329-4E5C-B134-E3EB867DC630}.Id\`d.T.~Ed/"
    $incident = @()
    $incidentobj = @()
    import-module smlets –force

    $class_SLATimeInfo = get-scsmclass -name System.SLA.Instance.TimeInformation$
    $class_Inc = get-scsmclass -name system.workitem.incident$
    $rel = get-scsmrelationshipclass -name System.WorkItemHasSLAInstanceInformation$
    $status_SLAActiveID = (get-scsmenumeration -name SLAInstance.Status.Active$).id

    $SLATimeInfos = get-scsmobject -class $class_slatimeinfo -filter “id = $SLAID”

    foreach($SLATimeInfo in $SLATimeinfos)
    {
    $incident = (get-scsmrelationshipobject –bytarget $SLATimeInfo).sourceobject
    $incidentobj += $incident.adaptemo()
    }

    $incidentobj = $incidentobj | select –unique

    foreach($inc in $incidentobj)
    {
    $SLATimes = $inc | get-scsmrelatedobject | where{$_.classname -eq $class_slatimeinfo} | foreach{$_.targetenddate}
    $TargetTime = $SLATimes | sort | select -first 1
    $inc | Set-SCSMObject -Property targetresolutiontime -value $targettime
    }

    If I comment out the - filter from - $SLATimeInfos = get-scsmobject -class $class_slatimeinfo #-filter “id = $SLAID”# and run the command from a Powershell window the code works and the Target Resolution Time Updates.

    Any suggestions would be helpful...

    Tuesday, February 26, 2013 2:51 PM

Answers

  • We ended up having a consulting company build us a custom column for the SLO target.  
    • Marked as answer by Matt Cosgrove Thursday, May 02, 2013 1:12 PM
    Thursday, May 02, 2013 1:12 PM

All replies