Get-CMCategory

Gets configuration categories in Configuration Manager.

Syntax

Get-CMCategory
   [-CategoryType <CategoryType>]
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMCategory
   -Id <String[]>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMCategory cmdlet gets configuration categories in Configuration Manager. Configuration categories offer an optional method of sorting and filtering configuration baselines and configuration items in Configuration Manager and Configuration Manager reports.

Note

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

Examples

Example 1: Get configuration categories by using a name

PS XYZ:\> Get-CMCategory -CategoryType "DriverCategories" -Name "NewLaptopDriverSet"

This command gets configuration driver categories in Configuration Manager that have the name NewLaptopDriverSet.

Parameters

-CategoryType

Specifies a category type. Valid values are:

  • BaselineCategories
  • DriverCategories
  • AppCategories
  • GlobalCondition
  • CatalogCategories
Type:CategoryType
Accepted values:UserCategories, BaselineCategories, DriverCategories, AppCategories, GlobalCondition, CatalogCategories
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

Specifies an array of IDs of configuration categories.

Type:String[]
Aliases:CategoryInstanceUniqueid, CategoryId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies an array of names of configuration categories.

Type:String
Aliases:LocalizedCategoryInstanceName, CategoryName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

Inputs

None

Outputs

IResultObject[]

IResultObject