Jump to content


  • 0
OEF

Powershell - How to create multiple Deployment Types

Question

Is there a way to create multiple Deployment Types under one application. I am using Add-CMScriptDeploymentType and get an error on the second one.

Add-CMScriptDeploymentType : ConfigMgr Error Object:
instance of SMS_ExtendedStatus
{
        Description = "The digest is not valid";
        ErrorCode = 1078462235;
        File = "..\\sspconfigurationitem.cpp";
        Line = 1980;
        Operation = "PutInstance";
        ParameterInfo = "";
        ProviderName = "ExtnProv";
        SQLMessage = "[42000][3998][Microsoft]

[SQL Server]Uncommittable transaction is
detected at the end of the batch. The transaction is rolled back.";
        SQLSeverity = 16;
        SQLStatus = 3998;
        StatusCode = 2147749889;
};
At C:\Install\CreateTKA.ps1:252 char:11
+           Add-CMScriptDeploymentType -ApplicationName $ApplicationNam ...
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Confi...mentTypeCommand:AddScriptDeploymentTypeCommand) [Add-CM
   ScriptDeploymentType], WqlQueryException
    + FullyQualifiedErrorId : UnhandledException,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.AddScriptDe
   ploymentTypeCommand

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I executed the script without having deleted the previous test and it did create the 2nd Deployment Type. I noticed that the Detection Clause param in the cmdlet is the one that causes the error however. Is there a way of detecting when the app object has been created, since the sleep for 15 sec command did not help

Share this post


Link to post
Share on other sites

  • 0

Had this exact error as well. Each deployment type was using a registry and a directory detection clause. I was reusing the same directory detection clause object and creating new registry clauses for each. Reusing the directory clause object was causing the issue. As soon as i removed\created a second directory clause object it worked perfectly.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.