locked
Add-CMDeploymentType : Specified cast is not valid. RRS feed

  • Question

  • Hi,

    I'm trying to write a Powershell-script to deploy software in SCCM 2012.

    Everything works fine but the Add-CMDeploymtenType, there I got this error:

    Creating Deployment Type Microsoft - Office - 2010 (1.0) - X64
    WARNING: The parameter 'AutoIdentifyFromInstallationFile' has been deprecated from this parameter set and may be removed in a future release.
    WARNING: Unexpected site version '-1' was detected. Defaulting to latest Application Management SDK API set. This may introduce cmdlet incompatibilities.
    Add-CMDeploymentType : Specified cast is not valid.

    This is my command:

    Add-CMDeploymentType -ApplicationName $AppVName -DeploymentTypeName $DeploymentTypeName -AppV5xInstaller -InstallationFileLocation $InstallFileLocation -AutoIdentifyFromInstallationFile -ForceForUnknownPublisher $true -AddRequirement $oDTRule  

    Note: I updated the Powershell to version 4.0 on Windows 2012 R2 and updated the lateste SCCM CMDlets due to an issue (which I also posted in the forum).

    Please advise.
    J.


    Jan Hoedt


    • Edited by janhoedt Friday, October 2, 2015 4:31 PM Update
    Friday, October 2, 2015 4:30 PM

Answers

All replies

  • This should be asked in the ConfigMgr PowerShell forum, since it is product specific:

    https://social.technet.microsoft.com/Forums/en-US/home?forum=configmanagersdk


    • Marked as answer by janhoedt Friday, October 2, 2015 5:14 PM
    Friday, October 2, 2015 4:34 PM
  • Sorry to resurrect this, Jan did you ever find anything on the 'Unexpected site version' warning?  I just received that with a toolset working on SCCM v1606 that was just implemented in our dev area. 

    Mike

    Wednesday, June 29, 2016 2:08 PM
  • Please see the marked answer. This is not an SCCM forum, as already noted. Please ask in that forum.

    -- Bill Stewart [Bill_Stewart]

    Wednesday, June 29, 2016 2:20 PM