We are currently working on automating the property patterns. So far we were able to add all the needed properties to a Property Pattern via PowerShell script apart from the Value Selection for the "Exchange Mailbox Store" property.
We tried to add the "homeMDB" property in the script but were unable to add a default value of 1 Mailbox DB and the constraints that only one selection can be made (like in the screenshot).
This is what it should look like:
We tried different approaches and in the code block bellow is the latest. Also we could't find any information for this in the SDK.
$DBS = @()
$DBS += "MBDB_DB1"
$item = $pattern.Items.Create()
$item.PropertyName = "homeMDB"
$item.IsPropertyRequired = $true
$constraints = $item.GetConstraints()
$constraint = $constraints.Create("ADM_PROPERTYCONSTRAINTTYPE_VALUERANGE")
$constraint.Values = $DBS
# Save the changes
The following image shows the result of the code above, which doesn't quite match the "should be" screenshot.
Any help would be much appriciated.