Found the solution ! I kept digging in the TechNet and found two things :
- how to deserialize
- my choice of words was bad : when speaking about Deployment Types, we do speak no more about Global Conditions but about Requirements
In the end, I solved my need with the following :
([Microsoft.ConfigurationManagement.ApplicationManagement.Serialization.SccmSerializer]::DeserializeFromString((Get-CMApplication -name AppName).SDMPackageXML)).DeploymentTypes.Requirements.Count
Of course, if there are more than one Deployment Types,
([Microsoft.ConfigurationManagement.ApplicationManagement.Serialization.SccmSerializer]::DeserializeFromString((Get-CMApplication -name winzip_FR_1.5.0_R1.000).SDMPackageXML)).DeploymentTypes[n].Requirements.Count
Well, thanks,