Edit

Share via


Get-CMSoftwareUpdateCategory

Get a software update classification or product.

Syntax

ByName (Default)

Get-CMSoftwareUpdateCategory
    [-Fast]
    [-Name <String>]
    [-TypeName <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

ById

Get-CMSoftwareUpdateCategory
    -Id <String>
    [-Fast]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

ByUniqueId

Get-CMSoftwareUpdateCategory
    -UniqueId <String>
    [-Fast]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

Description

Use this cmdlet to get an object for a software update classification or product. Software updates metadata is retrieved during the synchronization process in Configuration Manager based on the settings that you specify in the software update point component properties. For more information, see Configure classifications and products to synchronize.

To filter the results that this cmdlet returns, use the CategoryTypeName and IsSubscribed properties. The category types include UpdateClassification, Company, ProductFamily, and Product. When the IsSubscribed property is True, the site is configured to synchronize that category.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Show subscribed classifications

This example queries the site for all software update classifications that it's synchronizing.

Get-CMSoftwareUpdateCategory -Fast -TypeName "UpdateClassification" | Where-Object { $_.IsSubscribed } | Select-Object LocalizedCategoryInstanceName

To change this command to return the list of classifications that the site isn't synchronizing, add the not operator (!) before the reference to the IsSubscribed property. For example, !$_.IsSubscribed

Example 2: Count categories by type

This example counts how many categories the site has for each type. This count can help you determine if the software update point is out of sync with the upstream source.

Get-CMSoftwareUpdateCategory -Fast | Group-Object -Property CategoryTypeName
Count Name
----- ----
   13 UpdateClassification
    7 Company
   59 ProductFamily
  338 Product

Example 3: Show products for Office product family

This example first gets the product family category for Office, and then uses its instance ID to get all child categories.

$officeFamily = Get-CMSoftwareUpdateCategory -Fast -TypeName "ProductFamily" | Where-Object { $_.LocalizedCategoryInstanceName -eq "Office" }

Get-CMSoftwareUpdateCategory -Fast | Where-Object ParentCategoryInstanceId -eq $officeFamily.CategoryInstanceID | Select-Object LocalizedCategoryInstanceName,CategoryTypeName
LocalizedCategoryInstanceName         CategoryTypeName
-----------------------------         ----------------
Dictionary Updates for Microsoft IMEs Product
New Dictionaries for Microsoft IMEs   Product
Office 2002/XP                        Product
Office 2003                           Product
Office 2007                           Product
Office 2010                           Product
Office 2013                           Product
Office 2016                           Product
Office 365 Client                     Product
Office 2019                           Product

Example 4: Get all software updates in Office 365 Client category

This example first gets the product category for Office 365 Client, and then gets all software updates in that category.

$cat = Get-CMSoftwareUpdateCategory -Fast -TypeName "Product" | Where-Object { $_.LocalizedCategoryInstanceName -eq "Office 365 Client" }

Get-CMSoftwareUpdate -Fast -Category $cat | Select-Object ArticleID,LocalizedDisplayName,IsDeployed,IsSuperseded,NumTotal,NumMissing

Parameters

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Fast

Add this parameter to not automatically refresh lazy properties. Lazy properties contain values that are relatively inefficient to retrieve. Getting these properties can cause additional network traffic and decrease cmdlet performance.

If you don't use this parameter, the cmdlet displays a warning. To disable this warning, set $CMPSSuppressFastNotUsedCheck = $true.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

Specify the ID of the category to get.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:CategoryInstanceID

Parameter sets

ById
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specify the name of the category to get.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:LocalizedCategoryInstanceName, CategoryName

Parameter sets

ByName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TypeName

Specify the type of category to get. Common values include the following types:

  • UpdateClassification
  • Company
  • ProductFamily
  • Product

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:CategoryTypeName

Parameter sets

ByName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UniqueId

Specify the unique ID for the category to get. This value is the type name with a GUID for the category. For example, UpdateClassification:77835c8d-62a7-41f5-82ad-f28d1af1e3b1

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:CategoryInstance_UniqueID

Parameter sets

ByUniqueId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

IResultObject

IResultObject

Notes

For more information on this return object and its properties, see SMS_UpdateCategoryInstance server WMI class.