Search Results for

    Show / Hide Table of Contents

    RPS Patch Conditions

    Last updated on April 30, 2021.

    Last Reviewed and Approved on PENDING REVIEW

    Introduction

    This document provides guidance on how to use conditions to provide RPS with more information to make more precise assignments between patches and targets. Any conditions that are added to a patch will be used to determine which targets the patch gets assigned to. Therefore, any conditions must match up with a target's properties (name and value) that correleate with each condition property name and value. In addition, the condition operator will determine how to comparison is made between the target and the patch.

    Contains

    The contains condition will check if a target property value does not contain a condition value within it. This comparison is case sensitive.

    Examples:

    Target Property Value Condition Value Result
    ABC123 ABC123 true
    ABC123 456 false
    ABC123 BC12 true

    The patch manifest will store this operator in the operator tag as: like.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>like</Operator>
            <Value>MyCompu</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    support full and partial wildcards (asterisk - *) using the LIKE or NOTLIKE operators

    Does not contain

    The does not contain condition will check if a target property value does not contain a condition value within it. This comparison is case sensitive.

    Examples:

    Target Property Value Condition Value Result
    ABC123 ABC123 false
    ABC123 456 true
    ABC123 BC12 false

    The patch manifest will store this operator in the operator tag as: notlike.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>notlike</Operator>
            <Value>MyCompu</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    support full and partial wildcards (asterisk - *) using the LIKE or NOTLIKE operators

    Equal to

    The equal to condition will check if a target property value equals a condition value by doing a case insensitive comparison.

    Examples:

    Target Property Value Condition Value Result
    ABC123 ABC123 true
    ABC123 456 false
    ABC123 BC12 false

    The patch manifest will store this operator in the operator tag as: eq.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>eq</Operator>
            <Value>MyComputerName</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    Greater than

    The greater than condition will check if a condition value is greater than a target property value.

    Examples:

    Target Property Value Condition Value Result
    500 49 false
    500 500 false
    500 501 true

    The patch manifest will store this operator in the operator tag as: gt.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>NumberOfFolders</Property>
            <Operator>gt</Operator>
            <Value>500</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    Greater than or equal to

    The greater than or equal to condition will check if a condition value is greater than or equal to a target property value.

    Examples:

    Target Property Value Condition Value Result
    500 49 false
    500 500 true
    500 501 true

    The patch manifest will store this operator in the operator tag as: ge.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>NumberOfFolders</Property>
            <Operator>ge</Operator>
            <Value>500</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    Less than

    The less than condition will check if a condition value is less than a target property value.

    Examples:

    Target Property Value Condition Value Result
    500 49 true
    500 500 false
    500 501 false

    The patch manifest will store this operator in the operator tag as: lt.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>NumberOfFolders</Property>
            <Operator>lt</Operator>
            <Value>500</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    Less than or equal to

    The less than or equal to condition will check if a condition value is less than or equal to a target property value.

    Examples:

    Target Property Value Condition Value Result
    500 49 true
    500 500 true
    500 501 false

    The patch manifest will store this operator in the operator tag as: le.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>NumberOfFolders</Property>
            <Operator>le</Operator>
            <Value>500</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    Not equal to

    The not equal to condition will check if a target property value is not equal to a condition value by doing a case insensitive comparison.

    Examples:

    Target Property Value Condition Value Result
    ABC123 ABC123 false
    ABC123 456 true
    ABC123 BC12 true

    The patch manifest will store this operator in the operator tag as: ne.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>ne</Operator>
            <Value>MyComputerName</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    Regular expression does not match

    The regular expression does not match condition will check if a target property value does not match a condition value using a regular expression.

    Examples:

    Target Property Value Condition Value Result
    NFA ^(NFA)?(WNM)?(WNMA)?$ false
    WNM ^(NFA)?(WNM)?(WNMA)?$ false
    NFA123 ^(NFA)?(WNM)?(WNMA)?$ true

    The patch manifest will store this operator in the operator tag as: notmatch.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>notmatch</Operator>
            <Value>^(NFA)?(WNM)?(WNMA)?$</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    Regular expression match

    The regular expression match condition will check if a target property value matches a condition value using a regular expression.

    Examples:

    Target Property Value Condition Value Result
    NFA ^(NFA)?(WNM)?(WNMA)?$ true
    WNM ^(NFA)?(WNM)?(WNMA)?$ true
    NFA123 ^(NFA)?(WNM)?(WNMA)?$ false

    The patch manifest will store this operator in the operator tag as: match.

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>match</Operator>
            <Value>^(NFA)?(WNM)?(WNMA)?$</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    More Information on Regular Expressions

    Match a value in a list of values (Logical OR)

    The match or notmatch operators can be used to match multiple values where each value in the Value field wrapped in parentheses () and with a trailing question mark ? .

    For an exact Value match, the full string in the Value field must be enclosed with a caret ^ and a dollar sign $ .

    Manifest XML example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>Match</Operator>
            <Value>^(NFA)?(WNM)?(WNMA)?$</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    In this particular example, a Target with a Property of ComputerName will be assigned if its Value contains NFA, WNM, and WNMA.

    Match all values in a list of values (Logical AND)

    The match or notmatch operators can be used to match all values in a list where each value is prefixed with ?=.* and wrapped in paraentheses (). Also, the entire list is prefixed with a caret ^ and suffixed with .*$

    Manifest XML Example:

    <Conditions>
        <PackageAssignmentCondition>
            <Property>ComputerName</Property>
            <Operator>Match</Operator>
            <Value>^(?=.*The)(?=.*Best)(?=.*Computer).*$</Value>
        </PackageAssignmentCondition>
    </Conditions>
    

    In this particular example, a Target with a Property of ComputerName will be assigned if its Value contains all of the values: The, Best, and Computer.

    For example:

    Target Property Value Result
    The Best Computer true
    The Computer false
    The Best Computer Ever true
    Computer Best The true
    Best Computer false

    Common Regular Expressions

    The following is a list of example regular expressions that may be used in patch conditions.

    Expression Description Examples
    ^(NFA)?(WNM)?(WNMA)?$ Case sensitive logical OR with exact match of any value NFA, WNM, or WNMA . Then there is a match.
    If the value is: NF, or WN. Then there is not a match
    ^(?i)(NFA)?(WNM)?(WNMA)?$ Case insensitive logical OR with exact match of any value If the value is: nfa, wnm, or wnma . Then there is a match.
    If the value is: nf . Then there is not a match.
    ^(?=.The)(?=.Best)(?=.Computer).$ Case sensitive logical AND with full match of all values If the value is: The Best Computer . Then there is a match.
    If the value is: the best computer . Then there is not a match.
    ^(?i)(?=.The)(?=.Best)(?=.Computer).$ Case insensitive logical AND with full match of all values If the value is: the best computer . Then there is a match.
    If the value is: the worst computer . Then there is not a match.
    ^[a-zA-Z0-9 ]*$ Alphanumerics with space allowed If the value is: this is a 123 test . Then there is a match
    ^[a-zA-Z0-9]*$ Alphanumerics without space allowed If the value is: this is a 123 test . Then there is not a match
    In This Article
    Back to top Generated by DocFX