Set-SCSMIncident: two questions

Sep 17, 2010 at 7:34 AM

Hi,

just allow me two additinal questions concerning the cmdlets:

1. Any idea how to set the Escalated-Flag of an Incident with the cmdlet? Any chance?

2. Imagine you would reset the assigned user in an inciden, any chance to do that?

Thanks for any response.

Alex

Developer
Sep 17, 2010 at 7:33 PM

with the current incident cmdlet, it's not possible to set the escalated flag, however, you should be able to do by getting the incident with get-scsmincident and then using set-scsmobject to set the escalated property on incident object:

$myIncident = get-scsmincident <incident>
$myIncident.Object | set-scsmobject -pro @{ Escalated = $true }

As for setting the assigned user, i think there's a script in the module called "Set-IncidentUser", perhaps that does what you want.

 

Sep 21, 2010 at 8:32 PM

Thanks very much for this reply, jtruher. Really helps me!

Alex

Oct 1, 2010 at 1:41 PM

To understand which parameters I can set, I wrote next:

Get-SCSMIncident | gm

and got error:

Get-SCSMIncident : The member "RelatesToTroubleTicket" is already present.
At line:1 char:17
+ Get-SCSMIncident <<<<  | gm
    + CategoryInfo          : NotSpecified: (:) [Get-SCSMIncident], ExtendedTypeSystemException
    + FullyQualifiedErrorId : AlreadyPresentPSMemberInfoInternalCollectionAdd,SMLets.SCSMIncidentGet

Developer
Oct 4, 2010 at 6:32 PM

it looks like there's a bug in the object adapter for projections. You can still get to the projection object through the __base property on the object returned by get-scsmincident. I'll be updating the code sometime this month.