I have tried it using the Custom Commands Action "Add the user to a group", which only allows me to add the user to one group at a time, and can't use the multiple DNs that the object picker parameter provides.
Next I tried a powershell script:
$groupsParam = %param-gruppen% # TODO: modify me
$groupsParamSeparator = ";" # TODO: modify me
$groups = $Context.GetParameterValue($groupsParam)
foreach ($dn in $groups.Split($groupsParamSeparator))
{
$groups.Add($Context.TargetObject.AdsPath)
}
But I can't get it to work. Could you assist me in finding the best way to do this?