New-CMCoManagementPolicy

Create a co-management policy for a site.

Syntax

New-CMCoManagementPolicy
   -AutoEnroll <Boolean>
   [-CAWorkloadEnabled <Boolean>]
   [-ClientAppsWorkloadEnabled <Boolean>]
   [-CoManagementPolicyName <String>]
   [-DCWorkloadEnabled <Boolean>]
   [-EPWorkloadEnabled <Boolean>]
   [-O365WorkloadEnabled <Boolean>]
   [-RAWorkloadEnabled <Boolean>]
   [-WufbWorkloadEnabled <Boolean>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Use this cmdlet to create a co-management policy for a site. You can also switch workloads at the same time. For more information, see How to enable co-management in Configuration Manager.

After you create this policy, use the New-CMConfigurationPolicyDeployment cmdlet to deploy it to a collection.

Note

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

Examples

Example 1

This example creates a co-management policy that enables auto-enrollment, but doesn't switch any workloads. It then deploys the policy to the collection with ID XYZ00042.

$CoMgmtPolicyName = "CoMgmtSettingsProd"

New-CMCoManagementPolicy -CoManagementPolicyName $CoMgmtPolicyName -AutoEnroll $true -CAWorkloadEnabled $false -RAWorkloadEnabled $false -WufbWorkloadEnabled $false -EPWorkloadEnabled $false -DCWorkloadEnabled $false -O365WorkloadEnabled $false -ClientAppsWorkloadEnabled $false

New-CMConfigurationPolicyDeployment -CoManagementPolicyName $CoMgmtPolicyName -CollectionId "XYZ00042"

Parameters

-AutoEnroll

Set this parameter to $true to enable automatic client enrollment in Intune for existing Configuration Manager clients.

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

-CAWorkloadEnabled

Set this parameter to $true to switch the Compliance policies workload to Intune. For more information, see Co-management workloads.

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

-ClientAppsWorkloadEnabled

Set this parameter to $true to switch the Client apps workload to Intune. For more information, see Co-management workloads.

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

-CoManagementPolicyName

Specify the name for the policy to create.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DCWorkloadEnabled

Set this parameter to $true to switch the Device configuration workload to Intune. For more information, see Co-management workloads.

Type:Boolean
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

-EPWorkloadEnabled

Set this parameter to $true to switch the Endpoint protection workload to Intune. For more information, see Co-management workloads.

Type:Boolean
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

-O365WorkloadEnabled

Set this parameter to $true to switch the Office Click-to-Run apps workload to Intune. For more information, see Co-management workloads.

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

-RAWorkloadEnabled

Set this parameter to $true to switch the Resource access policies workload to Intune. For more information, see Co-management workloads.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

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

-WufbWorkloadEnabled

Set this parameter to $true to switch the Windows Update policies workload to Intune. For more information, see Co-management workloads.

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

Inputs

None

Outputs

IResultObject

Notes

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