Skip to main content

Posts

Showing posts with the label Dependency

PowerShell + SCCM 2012 : Create Dependency Rules

Following on my last post on creating supersedence rules in ConfigMgr Applications with PowerShell, this post is all about creating dependency rules. The approach is very similar to the last one and Adam Meltzer had already posted the sample C# version of the code here  . Have to admit I tried to re-use the code from the last time and in the Process screwed one of the Applications (by putting up wrong serialized XML on the WMI Instance of the App). There can be multiple dependencies in ConfigMgr (attached with a OR or AND operator), but for the sake of simplicity we will look at a very simple scenario  : Scenario: For Application 1 ( Notepad++ in this case) we will add an Application 2 (e.g .NET 4 ) as the dependency. I know that hardly is a dependency but I am a bit lazy to create other applications at the moment...though I can do that with #PowerShell too..but am too lazy for that too :P  At the end of the Code we will get this relationship: Code...