May
31

SCSM PowerShell Cmdlets v0.1

By

Inspired by Travis Wright over at the product team’s Service Manager blog, I’ve started a new Codeplex project that will develop a PowerShell snap-in containing useful Service Manager cmdlets. Today I’ve released the first preview version which will give you an idea of what’s to come!

Included is a set of cmdlets which gives you the power to create, update and search for Incidents in Service Manager 2010.
Go to http://smlets.codeplex.com/ and grab the download to start testing this out!

Included cmdlets are:

  • Get-SCSMIncident
    Ex. get all incidents that includes the word “network” in the title (wildcard by %) and has the status “Active”
  • Set-SCSMIncident
    Ex. update an incident’s description and attach a new file.
  • New-SCSMIncident
    Ex. register a new incident with title, description, impact, urgency, classification and source.

Using these we can now do stuff like closing all incidents which title starts with “Network”, has the status Resolved and hasn’t been touched for a given period of time
Get-SCSMIncident –Title “Network%” –Status Resolved –InactiveFor 5.00:00:00 | Set-SCSMIncident –Status Closed –Comment “Closed due to inactive period”

Don’t miss the solution built using these cmdlets by Anders Bengtsson over at contoso.se, where he solves the intensively discussed problem regarding “update incident by mail”.

Comments

  1. [...] Automatically close “Resolved” cases after a certain period of inactivity. Click here for more information. I also took it a step further and used a great application called PowerWF and [...]

Leave a Reply