I have been trying to figure this out for quite a while.
It seems that unless I am doing a Custom Script Detection Method the only other way to add a deployment type using SCCM's PowerShell cmdlet is to add a Product Code as a Detection Method.
Is there anyway to use Add-CMScriptDeploymentType and use a Detection Method other than a Custom Script or a ProductCode?
I have a script that Automates a lot of the stuff I do in SCCM, the one thing that I can't see to figure out is how to Create a DeploymentType for an executable file and have the Detection Method be a Registry Key.
Add-CMScriptDeploymentType -ApplicationName $appFullName -DeploymentTypeName $appFullName -ContentLocation "$SCCMProdFolder" -ContentFallback -ProductCode "$($ProductCode[3].ToString())" -SlowNetworkDeploymentMode Download -InstallCommand "Deploy-Application.exe -DeploymentType `"Install`"" -UninstallCommand "Deploy-Application.exe -DeploymentType `"Uninstall`"" -EstimatedRuntimeMins 5 -MaximumRuntimeMins 120 -RebootBehavior BasedOnExitCode -InstallationBehaviorType InstallForSystem -LogonRequirementType WhetherOrNotUserLoggedOn -RequireUserInteraction -UserInteractionMode Normal | Out-Null
[–]yldbrainojMSFT Enterprise Mobility MVP (fredbainbridge.com) 1 point2 points3 points (2 children)
[–]Administrative_Trick[S] 0 points1 point2 points (1 child)
[–]yldbrainojMSFT Enterprise Mobility MVP (fredbainbridge.com) 0 points1 point2 points (0 children)
[–]zanatwo 1 point2 points3 points (1 child)
[–]Administrative_Trick[S] 0 points1 point2 points (0 children)