Get-CMConfigurationPolicy

Gets a configuration policy.

Syntax

Get-CMConfigurationPolicy
   [-AsXml]
   [-CategoryInstanceType <String[]>]
   [-Fast]
   [[-Name] <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMConfigurationPolicy
   [-AsXml]
   [-CategoryInstanceType <String[]>]
   [-Fast]
   [-Id] <Int32>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMConfigurationPolicy
   [-AsXml]
   [-CategoryInstanceType <String[]>]
   [-Fast]
   [[-InputObject] <IResultObject>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMConfigurationPolicy cmdlet gets a configuration policy.

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 a configuration policy by name

PS XYZ:\> Get-CMConfigurationPolicy -Name "TrustedCACert01" -AsXml

This command gets the configuration policy named TrustedCACert01 and displays the output in XML format.

Example 2: Get a configuration policy by ID

PS XYZ:\> Get-CMConfigurationPolicy -Id 16777454 -Fast

This command gets the configuration policy with the ID of 16777454 and does not display lazy properties.

Parameters

-AsXml

Specifies that the configuration policy is returned in XML format.

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

-CategoryInstanceType

Specifies an array of category instance types.

Type:String[]
Aliases:CategoryInstanceTypes
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

-Fast

Indicates that the cmdlet does not automatically refresh lazy properties.

Lazy properties contain values that are relatively inefficient to retrieve which can cause additional network traffic and decrease cmdlet performance. If lazy properties are not used, this parameter should be specified.

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 the CI__ID of a configuration policy.

Type:Int32
Aliases:CIId, CI_ID
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specifies a configuration policy object.

Type:IResultObject
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of a configuration policy.

Type:String
Aliases:LocalizedDisplayName
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject[]

IResultObject