Change status in Service Manager 2012 with PowerShell

If you need to change the status of a Service Request in Service Manager 2012 you can do this with PowerShell. Here is an example.

Before running the PowerShell commands install SMLets and import the module into the PowerShell prompt.

Example

Import-Module SMLets
$Class = Get-SCSMClass -Name System.WorkItem.ServiceRequest$
Get-SCSMObject -Class $Class -filter “Id -eq SR10” | Set-SCSMObject -Property Status -Value InProgress

Other status values that can be used

Closed
Completed
Cancelled
Failed
Submitted
New
Active
Resolved
Pending
Editing

Other classes that can be used

System.workitem.ChangeRequest$
System.workitem.Incident$
System.workitem.Problem$
System.workitem.ReleaseRecord$

No comments yet.

Leave a Reply