Get-​CM​Configuration​Policy

Gets a configuration policy.

Syntax

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

Description

The Get-CMConfigurationPolicy cmdlet gets a configuration policy.

Examples

Example 1: Get a configuration policy by name

PS C:\> 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 C:\> Get-CMConfigurationPolicy -Id 16777454 -Fast

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

Required Parameters

-Id

Specifies the CI__ID of a configuration policy.

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

Optional Parameters

-AsXml

Specifies that the configuration policy is returned in XML format.

Type:SwitchParameter
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

Specifies a configuration policy object.

Type:IResultObject
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of a configuration policy.

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

Outputs

IResultObject[]#SMS_ConfigurationPolicy