Quantcast
Channel: System Center 2019, 2016 et 2012 forum
Viewing all articles
Browse latest Browse all 1222

How to modify a detection method for an existing application ?

$
0
0

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




Viewing all articles
Browse latest Browse all 1222

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>