0 votes

I've the following Before Mofifying user job (Custom Command Delete):

Import-Module Adaxes
$user = Get-AdmUser "%distinguishedName%" -Properties MemberOf
if ($user.MemberOf -ne $Null)
{
foreach ($groupDN in $user.MemberOf)
{
Remove-AdmGroupMember $groupDN -Members $user -Confirm:$False
}
}
Start-Sleep -Seconds 5

I've also an After Modifying user job which executes several Custom Commands. The Custom Command adds the user to a group. After changing the department all group memberships are deleted so that works well. But the After job sometimes works completely and sometimes it works partially. Custom Command (1) sets group membership for all users and Custom Command (2) sets group membership based on department. For some reason the Custom Command 1 does not work randomly, in the logging it is stated that the user is added to those groups but that's not the case. Custom Command 2 is also executed and in the logging is stated the user is added to those groups, which indeed is the case.

I've also tested the Custom Command Delete in the After Modifying job with the same result.

How to solve this?

Thnx Remco

by (780 points)
0

Remco,

Can you post here or send to our support email (support@adaxes.com) the following:

  1. A screenshot of the Business Rule executed Before Mofifying a User.
  2. A screenshot of the Business Rule executed After Mofifying a User.
  3. Screenshots of both the Custom Commands.

Please log in or register to answer this question.

Related questions

0 votes
1 answer

We have a business rule that will update an AD attribute when a new member is added to a group. This business rule works when we use powershell commands or the admin console ... set to trigger "After adding a member to a group". Thank you for your support!

asked Mar 29, 2023 by mark.it.admin (2.3k points)
0 votes
0 answers

Hello, I have a Group Membership section on the Self Service Web interface. The idea is to have a list of the groups the user is a member of, but only the groups with their ... seems to work so I'm not sure where else I should be looking to fix the problem.

asked Dec 24, 2018 by LindaPeterson (20 points)
0 votes
0 answers

Hello, I have a Group Membership section on the Self Service Web interface. The idea is to have a list of the groups the user is a member of, but only the groups with their ... seems to work so I'm not sure where else I should be looking to fix the problem.

asked Nov 2, 2015 by drew.tittle (810 points)
0 votes
1 answer

Hello! I've made a simple business rule: AFTER adding a member to a group IF Operation Succeeded THEN Send email notification In the activity scope, I have selected the group ... but the business rule isn't triggered. How do I make this work? Regards, Erlend

asked Oct 22, 2014 by Erlend (160 points)
0 votes
0 answers

Hello The "Send mail"-Function is not working if i use the %mail%-Parameter. If i want to send an information like "Your password will expire in 7 Days" via mail but it ... if i put a specified recipient in the "To"-Field the recipient will get the message.

asked 4 days ago by Baul (110 points)
3,358 questions
3,057 answers
7,805 comments
545,182 users