Quantcast
Channel: SCSM PowerShell Cmdlets
Viewing all articles
Browse latest Browse all 306

New Post: Using SMlets for classes other than the standard commands

$
0
0

Are you looking for information on how to update an incident using get-scsmobject, or what is the goal for using the get-scsmobject cmdlet?

To get the class, you'll want to run the following:

get-scsmclass -name system.workitem.incident | where {$_.displayname -eq "incident"}

Using this in the get-scsmobjet cmdlet:

get-scsmobject -class (get-scsmclass -name system.workitem.incident | where {$_.displayname -eq "incident"})

This will retrieve all incidents in the system.  If you want to filter on a specific IR, you'll want to add the filter switch:

get-scsmobject -class (get-scsmclass -name system.workitem.incident | where {$_.displayname -eq "incident"}) -filter "Id -eq IR9999"

Hope this helps!

 

 

 

Viewing all articles
Browse latest Browse all 306

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>