Just to abstract the true/false thing; evaluating the array against a contains clause will ultimately return either true or false (does contain or does not contain). The AppEval needs a true or false result from a condition. I didn't really mean just the condition itself.
But I really like that you can use the gc and evaluate different conditions. Much better than a gc for notepad, one for another process, and so on. If I understand your example correctly, you would have a gc that returns all processes, the app evaluates the condition for notepad so if notepad is running then the app would not evaluate, with a fast-retry return, and the app would finally evaluate and start installing only at the next evaluation if notepad is this time not running? I have seen this before (Internet Explorer). Then you truly have a global condition you can use on a different app to evaluate for a different running process. Or you could have a script-based gc that returns a list of print drivers, etc. From: [email protected] [mailto:[email protected]] On Behalf Of Trevor Sullivan Sent: 13 March 2014 15:48 To: [email protected] Subject: RE: [mssms] VOTE: ConfigMgr 2012: Script-based Global Conditions should return arrays Andrew, Global Conditions are more than merely true/false statements. You can perform a value comparison in addition to performing existential comparisons. For example, let's say that the PowerShell script in a Global Condition contained the following code: (Get-Process).Name; This script / command would return an array of String objects. When you use the Global Condition on a Deployment Type, you could use the "contains" operator to check that the array "contains" "notepad." In PowerShell lingo, this would look like this: (Get-Process).Name -contains 'notepad'; Cheers, Trevor Sullivan From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Andrew Craig Sent: Thursday, March 13, 2014 9:42 AM To: [email protected]<mailto:[email protected]> Subject: RE: [mssms] VOTE: ConfigMgr 2012: Script-based Global Conditions should return arrays Hi Trevor, Sorry, I don't get why you would want to return an array. You evaluate a condition to be true or false so even if you really did have an array from the script logic you could evaluate this array in the script and then return true or false. To return an array to the condition, does that not mean that a condition could be kinda compliant or sorta non-compliant? Not being flippant, just can't picture a use case. Andy From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Trevor Sullivan Sent: 13 March 2014 15:17 To: [email protected]<mailto:[email protected]> Subject: [mssms] VOTE: ConfigMgr 2012: Script-based Global Conditions should return arrays Folks, For anyone who is using PowerShell scripts within custom Global Conditions, please review this bug and vote on it: https://connect.microsoft.com/ConfigurationManagervnext/feedback/details/832849/dcr-script-based-global-conditions-should-be-able-to-return-arrays There are ways to work around this by joining an array of strings into a singleton object, but being able to return object arrays from a PowerShell script would be very useful. Cheers, Trevor Sullivan

