Add-CMDeploymentType : Value cannot be null.

Hi,

I have this command which doesn't work. I remember it worked fine before, we did upgraded to SCCM 2012 R2 SP1, any idea what could be wrong? Please advise.

Add-CMDeploymentType -ApplicationName $ApplicationName -LogonRequirementType WhereOrNotUserLoggedOn -MsiInstaller -DeploymentTypeName $StandardProgramName -AdministratorComment $Description -InstallationProgram  'OurCustomScript' -UninstallProgram 'OurCustomScript' -ContentLocation $PackagePath -DetectDeploymentTypeByCustomScript -ScriptType Powershell -ScriptContent "Dummy" -RunScriptAs32bitProcessOn64bitClient $False -ManualSpecifyDeploymentType -InstallationBehaviorType InstallForSystem -InstallationProgramVisibility $RunType -AddRequirement $oDTRule -verbose


Add-CMDeploymentType : Value cannot be null.
Parameter name: contentFile
At line:1 char:1
+ Add-CMDeploymentType -ApplicationName $ApplicationName -LogonRequirementType ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Microsoft.Confi...mentTypeCommand:AddDeploymentTypeCommand) [Add-CMDeploymentType], InvalidOperationException
    + FullyQualifiedErrorId : ValidationError,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.AddDeploymentTypeC

September 10th, 2015 4:14pm

Hi,

I tested Add-CMDeploymentType cmdlet in SCCM 2012 R2 and SCCM 2012 R2 SP1. It worked in SCCM 2012 R2 but failed in SCCM 2012 R2 SP1. The error is the same as yours and I also got a warning:The parameter 'ManualSpecifyDeploymentType' has been deprecated and may be removed in a future release.

Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 4:27am

Ok, yes, I had the same message but even if you remove that, error is the same.
September 11th, 2015 5:25am

Any chance that the issue is fixed with https://www.microsoft.com/en-us/download/details.aspx?id=46681?
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 6:25am

If I change the -msinstaller to -scriptinstaller it works fine. However the name of the deploymenttype is not correct anymore then. It states "Script Installer".

Please advise.

September 11th, 2015 7:42am

Hi,

This error is gone after updated System Center Configuration Manager Cmdlet Library. But I got another error: Add-CMDeploymentType : Parameter set cannot be resolved using the specified named parameters.

Having set all the parameters as document. The AddDeploymentTypeByMsiInstallerAuto works fine.

Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 3:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics