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