Hello,
The $propertyForSearch variable should contain the LDAP name of the attribute, whose values must match at least one value specified in the array of the $valuesForSearch variable. For example, when the variables are specified like the following:
$propertyForList = "physicalDeliveryOfficeName"
$propertyForSearch = "description"
$valuesForSearch = @("Value1", "Value2")
$patternName = "User Pattern"
$propertyToUpdate = "physicalDeliveryOfficeName"
The value of the Office property will be added to the list of values allowed for the Office property in the User Pattern Property Pattern if the Office property of the account contains any value and the Description property of the account equal Value1 or Value2.
For your information, LDAP name of the Office property is physicalDeliveryOfficeName. So, if you want to update the list of allowed values for the property in a Property Pattern, the values of the $propertyForList and $propertyToUpdate variables should be specified as physicalDeliveryOfficeName.