Summary: This article contains step-by-step instructions on how to use the AD Users | Set attribute value rule to update multi-valued attributes.
Applies to: Cayosoft Administrator 8.4.0 or later
ID: KB20220421-1
Instructions
Replace values
- In Admin Console navigate to Home > RULES > Active Directory > AD Users | Set Attribute Value.
- Specify the rule scope.
- In Attributes specify a multivalued attribute to replace the values. For example, accountNameHistory.
- Set Value to {@("value1", "value2")}
- Save changes.
Append values
- In Admin Console navigate to Home > RULES > Active Directory > AD Users | Set Attribute Value.
- Specify the rule scope.
- Open the More Options section and add the accountNameHistory attribute to Returned properties.
- In Attributes specify a multivalued attribute to append the values. For example, accountNameHistory.
- Add this script to Value:
{ $FoundObject.accountNameHistory | %{ $ret=@("VALUE_TO_APPEND1","VALUE_TO_APPEND2") }{ $ret+=$_.ToString() }{ $ret } }
- Save changes.
Remove value
- In Admin Console navigate to Home > RULES > Active Directory > AD Users | Set Attribute Value.
- Specify the rule scope.
- Open the More Options section and add the accountNameHistory attribute to Returned properties.
- In Attributes specify a multivalued attribute to remove the value. For example, accountNameHistory.
- Add this script to Value:
{ $FoundObject.accountNameHistory | %{ $ret=@() }{if($_ -eq "VALUE_TO_REMOVE"){return} $ret+=$_.ToString() }{ $ret } }
- Save changes.
Comments
0 comments
Please sign in to leave a comment.