I am attempting to automate the import of App-V 5 packages into SCCMv1802 via PowerShell. I am using the suggested Add-CMAppvDeploymentType command, targeting the package manifest file. I get an error message (see below) referring to the package manifest file not containing a valid root node.
I have attempted to use different packages and manifest files to rule out a potential dodgy package, but I've ended up with the same result. Importing the packages manually via the GUI also works ok.
Add-CMAppVDeploymentType -ApplicationName $AppName -ContentLocation $ContentLocation -DeploymentType "AppV"
Here's the exact error message I get:
Add-CMAppVDeploymentType : The specified App-V package's manifest file does not contain a valid root node At line:1 char:1 + Add-CMAppVDeploymentType -ApplicationName $AppName -ContentLocation $ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Add-CMAppvDeploymentType], InvalidDataException + FullyQualifiedErrorId : System.IO.InvalidDataException,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.AddAppvDeploymentTypeCommand
I’ve come across the solution. It turns out that the Add-CMAppVDeploymentType is deprecated and won’t work with App-V 5 packages. I have instead used the Add-CMAppv5XDeploymentType cmdlet which targets the .appv file instead of the manifest.
Add-CMAppv5XDeploymentType -ApplicationName $AppName -ContentLocation $ContentLocation -DeploymentTypeName "Appv5X"