Hi all !
First, sorry for my english, i'm french ! =)
This is my problem :
I've a SCCM 2012 R2 with existing applications.
They just have a default detection method, and I want to add new ones.
I know how to create detection methods but my problem is to add them to an existing application.
To get my application, i do :
$App = Get-CMApplication -Id 17854124
And to apply my new deployment type, i do:
$App.DeploymentType.Add($deployment)
And I have this error :
You cannot call a method on a null-valued expression.
I think I have a problem with the objects types.
I need to do my "DeploymentType.Add" command on a "microsoft.configurationmanagement.applicationmanagement.application" object type but I get a "Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObjectBase"
object.
Does someone can help me with that ?
Or give me an example to do what I want.
Thank you in advance ! =)
Bye