Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Update: These cmdlets did not make it into the 1704 TP, but they will be in the 1705 TP. This posting has been updated to correct this.
In the upcoming 1705 technical preview of Configuration Manager, we have finally added the much-requested ability to add enhanced detection method clauses to deployment types PowerShell. This posting will discuss the basic concepts of how this will work, along with what is and is not supported at this time.
For 1704 technical preview the following functionality can now be done through PowerShell:
These features are planned to be added in a future release:
A detection clause object is created with one of the new New-CMDetectionClause<type> cmdlets, and then added to a new or existing deployment type using the -AddDetectionClause parameter. One or more detection clauses can be added at a time.
Two detection clauses are created, one for an existing installer matching a specific value, and another for a directory to exist on the C drive. These clauses are then added to a new deployment type.
$clause1 = New-CMDetectionClauseWindowsInstaller -ProductCode $guid [Value -ExpressionOperator IsEquals -ExpectedValue "1.1.1.1" # Do a version check
$clause2 = New-CMDetectionClauseDirectory -DirectoryName "mymsi" -Path "C:\" -Existence # c:\mymsi should exist
$app | Add-CMMsiDeploymentType -ContentLocation "\\myserver\mypath\mymsi.msi" -Force -AddDetectionClause ($clause1, $clause2)
These cmdlets have been created in 1704 to enable DCM rule and setting support:
Note: Add/Set-CMMsiDeploymentType, Add/Set-CMScriptDeploymentType, and Add/Set-CMMacDeploymentType now have new -AddDetectionClause and -RemoveDetectionClauseparameters to facilitate adding and removing enhanced detection methods.
Please sign in to use this experience.
Sign in