I have a need to modify an attribute whenever a user is removed from a group. Stored in every users extensionattribute5 are values like this 1024adm;1025adm;1969adm;1429adm;
We have matching groups for each of those values. What I would like is that when a user is removed from group 1969adm it removes that text from the users extensionattribute5. I was hoping a workflow would do the trick BUT i am having a hard time referencing the user that was removed from the group.
When i use an script to get a variable for the object it references the group and not the user.
function onPreModify($Request)
{
$attrib = $Dirobj.get("extensionattribute5") #this reads groups extensionatttribute5.
return $attrib
}
Any help on how to reference the user(Activity target) in a powershell script would be great.
Thanks