Copy-CMConfigurationPolicy

Copies a configuration policy.

Syntax

Copy-CMConfigurationPolicy
    [-Id] <Int32>
    [-NewName] <String>
    [-Confirm]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-PassThru]
    [-WhatIf]
    [<CommonParameters>]
Copy-CMConfigurationPolicy [-InputObject]  [-NewName]  [-Confirm]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-PassThru] [-WhatIf] []
Copy-CMConfigurationPolicy [-Name]  [-NewName]  [-Confirm] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-PassThru] [-WhatIf] []

Description

The Copy-CMConfigurationPolicy copies a configuration policy. A configuration policy can be a client authentication certificate profile configuration item, a wireless profile configuration item, or others. See the Alias section for additional policy items that you can use this cmdlet to copy.

Examples

Example 1: Copy a configuration policy by using the pipeline

PS C:\> Get-CMConfigurationPolicy -Name "TrustedCACert01" -Fast | Copy-CMConfigurationPolicy -NewName "TrustedCACert01_copy"

This command gets the configuration policy object named TrustedCACert01 and uses the pipeline operator to pass the object to Copy-CMConfiguratinPolicy, which creates a copy of the policy and names it TrustedCACert01_copy.

Example 2: Copy a configuration policy by ID

PS C:\> Copy-CMConfigurationPolicy -Id 16777454 -NewName "EmailProfile1_copy"

This command makes a copy of the configuration policy with the ID of 16777454 and names it EmailProfile1_copy.

Required Parameters

-Id

Specifies the CI_ID of a configuration policy.

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

Gets a configuration policy object. To obtain a configuration policy object, use the Get-CMConfigurationPolicy cmdlet.

Type:IResultObject
Aliases:ConfigurationPolicy
Required:True
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
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewName

Specifies a name for the copy of the configuration policy.

Type:String
Required:True
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

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

Indicates that wildcard handling is enabled.

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

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

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

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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