PowerShell and Service Manager

Marcos André Machado da Silva 0 Reputation points
2023-10-27T18:21:56.11+00:00

I want to pull some information and Incidents from the Service manager through PowerShell, I'm using the command:

Get-SCSMClassInstance -Class (Get-SCSMClass -Name System.WorkItem.Incident) -Filter 'Id -eq "IR1131310"'

However, the data that I really need (to filter) does not appear in the powershell imports, in fact there are 2, Site and Classification category (or site):

[enter image description here

](https://i.stack.imgur.com/mQKhr.png)

Is there any method for me to pull the information? Thanks

System Center Service Manager
Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 129.4K Reputation points MVP Volunteer Moderator
    2023-10-27T20:45:48.3066667+00:00

    Hi @Marcos André Machado da Silva ,

    Instead of Get-SCSMClassInstance you can use Get-SCSMObject:

    Get-SCSMObject -Class (Get-SCSMClass -Name System.WorkItem.Incident) -Filter "Id -eq IR1131310" | Select-Object *
    

    The result will look like this:

    enter image description here


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards Andreas Baumgarten

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.