Microsoft

System Center Configuration Manager Feedback

Suggestion box powered by UserVoice

How can we improve Configuration Manager?

Add-CMScriptDeploymentType -AddDetectionClause "OR" functionality

It would be helpful to have the ability to select OR as a Connector Value (which only has 2 states AND, OR) for the AddDetectionClause of Add-CMScriptDeploymentType
The best example of this is when trying to create a ConfigMgr Client Update application. The client has a different GUID depending on whether it is x86 or x64.

Why am I making a separate application deployment for the client upgrade as opposed to the built in one? The built in one will not use the files local to itself and pull the entire content accross the WAN again. So building an application that uses "ccmsetup /source:%~dp0" to use local source is a better solution.

#Deployment *******NEED ABILITY TO SET OPERATOR FOR -ADDDETECTIONCLAUSE TO "OR" DEFAULT IS "AND"
$Detect1 = New-CMDetectionClauseWindowsInstaller -ProductCode $APPGUIDx64 -Existence
$Detect2 = New-CMDetectionClauseWindowsInstaller -ProductCode $APPGUIDx86 -Existence
$DeployedApp = Add-CMScriptDeploymentType -ApplicationName $APPName -DeploymentTypeName $DepTypeName `
-Comment $DepTypeComment -ContentLocation $DepContLoc -EnableBranchCache -CacheContent `
-InstallCommand $DepInstProg -UninstallCommand $DepUninstProg -UninstallWorkingDirectory $DepUninstLoc `
-AddDetectionClause($Detect1,$Detect2) -InstallationBehaviorType InstallForSystem `
-UserInteractionMode Normal -LogonRequirementType WhetherOrNotUserLoggedOn `
-ScriptLanguage PowerShell -ScriptText "#" -SlowNetworkDeploymentMode Download

1 vote
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
James Mymryk shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Anonymous commented  ·   ·  Flag as inappropriate

    This worked for me:

    $Detect1 = New-CMDetectionClauseWindowsInstaller -ProductCode $APPGUIDx64 -Existence
    $Detect1.Connector = 'Or'

Feedback and Knowledge Base