Currently scripting for SCCM to automate
creation of collections
populating collections
etc..
I'd like to add a "verification" step.
I want to ensure (through commandline since I want to automate it) that a Deployment Type has at least one Global Condition.
I searched
Could I find a commandlet that would do the trick ?
- a way using WMI :
Get-WmiObject -list -Namespace root\sms\site_[sitecode]
Could i find a class that would give me the information ?
- a WQL
I found two information :
whether a Global Condition is in use or not : interesting but not quite useful in my case
the Global Condition name(s) can be found using
Get-CMDeploymentType -applicationname [AppName]).SDMPackageXML
My Global Conditions have not all the same prefix. So the following might work in some case but can not be trusted : PS P41:\> (Get-CMDeploymentType -applicationname PKG_10).SDMPackageXML -match "GC_"
That is where I need a little help. What am I missing ? Which WQL query would give me the information/confirmation I need ?