SCCM + PowerShell - Detect Methods

Sokoban 1,036 Reputation points
2024-09-14T19:48:56.9433333+00:00

Hi I trying to make Detect Method with PowerShell:

I have done a Application Information

New-CMApplication `
	 -Name "Adobe Acobat Reader" `
	-Description "Adode Acrobe Reader 64 bits" `
	-Publisher Adobe -SoftwareVersion 24.003.20112 `
	-IconLocationFile  "\\SCCMServer\Apps\Adobe Reader\icon.jpg"

And now I want to create Detection Method with Product code

$clause = New-CMDetectionClauseWindowsInstaller -Existence -ProductCode AC76BA86-1033-FF00-7760-BC15014EA700

Set-CMScriptDeploymentType `
	-ApplicationName "Adobe Acrobat Reader" `
	-DeploymentTypeName "AcroPro.msi" `
         -AddDetectionClause $clause

I got error ..

Set-CMScriptDeploymentType : No object corresponds to the specified parameters.
At line:1 char:1
+ Set-CMScriptDeploymentType `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Confi...tDeploymentType:SetScriptDeploymentType) [Set-CMScrip
   tDeploymentType], ItemNotFoundException
    + FullyQualifiedErrorId : ItemNotFound,Microsoft.ConfigurationManagement.PowerShell.Cmdlets.AppMan.SetScriptDeploy
   mentType

What is wrong ?

Sokoban

Microsoft Configuration Manager
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,596 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 45,531 Reputation points Microsoft Vendor
    2024-09-16T01:37:37.81+00:00

    Hi, @Sokoban

    I see you have solved the problem about deployment type in another thread, so is this problem solved too?

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.