Get-CMDeploymentTypeDetectionClause
Get the detection clauses from the specified deployment type.
Syntax
Get-CMDeploymentTypeDetectionClause
-InputObject <IResultObject>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Description
Starting in version 2107, use this cmdlet to get the detection clauses from the specified deployment type.
You can use this cmdlet to get a detection clause from one app and apply it to another.
Examples
Example 1: Copy a detection clause between apps
This example gets an MSI deployment type from the CenterApp application. It then uses Get-CMDeploymentTypeDetectionClause to get the detection clause. The third line applies that clause with Set-CMScriptDeploymentType to another application.
$appMsi = Get-CMDeploymentType -ApplicationName "CenterApp" -DeploymentTypeName "InterDept - Windows Installer (.msi file)"
$clause1 = Get-CMDeploymentTypeDetectionClause -InputObject $appMsi
Set-CMScriptDeploymentType -ApplicationName "Configuration Manager console" -DeploymentTypeName "Install" -AddDetectionClause $clause1
Parameters
-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 |
-InputObject
Specify a deployment type object from which to get the detection clause. To get this object, use the Get-CMDeploymentType cmdlet.
Type: | IResultObject |
Aliases: | DeploymentType |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject
Outputs
DetectionClause[]
DetectionClause