Software ConfigItems RRS feed

  • Question

  • I am attempting to use PowerShell to list all software sitting in a deleted Status to review before purging from Service Manager.

    I can achieve this by using "Get-SCSMclass -Name System.ConfigItem" but it lists all configuration items

    Is there a better way to filter this where it will separate out Software from the list similar to how one can run the "Get-SCSMclass -Name System.Printer" to pull just printers.

    here is the full script I'm running

    Import-Module smlets
    $Software = Get-SCSMclass -Name System.configitem
    Get-SCSMObject -Class $Software | where {$_.objectstatus -match “deleted”}

    thank you

    Wednesday, April 12, 2017 8:06 PM


  • Please try this (you can modify the variable $status like you need):
    Import-Module SMLets
    $status = "Active"
    $swClass = Get-SCSMClass -Name System.SoftwareItem$
    Get-SCSMObject -Class $swClass  | where {$_.objectstatus -match $status} | select DisplayName, ObjectStatus

    Hope this helps.

    Andreas Baumgarten | H&D International Group

    Thursday, April 13, 2017 11:17 AM