Currently, when I disable a user account in Adaxes, the group memberships of the user remain intact. I'd like to automate the removal of group memberships such as distribution lists and security groups from the user after I disable his/her account. I want to set it up with email notifications that shows a list of groups/DL that the user was previously in and removed from. Thanks!

by (20 points)

1 Answer

by (309k points)
0 votes

Hello Jayden,

To automatically remove a user from all the groups after disabling their account, you need to use a Business rule triggering After disabling a user account. In the rule, use the following script from our repository: https://www.adaxes.com/script-repository/remove-all-group-memberships-for-a-user-account-s33.htm.

However, if a user is disabled outside of Adaxes (e.g. using Active Directory Users and Computers), the business rule will not trigger. For such cases, you can use the script in a scheduled task like below: image.png

by (20 points)
0

Thank you! I have a quick question, for the script that sends an email notification, how should the format of this line be?

'$to = "recipient@domain.com"' I tried doing '$to = "recipient1@domain.com", "recipient2@domain.com"' and when I disable a user account, only recipient2 gets the notification email..

by (309k points)
0

Hello Jayden,

The line should be like below:

$to = "recipient1@domain.com, recipient2@domain.com"

Related questions

https://www.adaxes.com/script-repository/remove-all-group-memberships-for-a-user-account-s33.htm I found this script but it only removes 365 groups, security groups, and ... user from all shared mailboxes they are a member of when disabling a user. Thanks!

asked Sep 8, 2023 by silicondt (60 points)
0 votes
1 answer

The script create two reports of inactive workstation operating systems. The report is too detailed to run from one of the adaxes reports. Basically how can I set the script up to ... sure How I did this but I can't find it now (probably something simple).

asked Nov 30, 2022 by mightycabal (1.2k points)
0 votes
1 answer

We would like the membership in a distribution group to be based on a particular M365 license a user has (for example, Microsoft Copilot for Microsoft 365 (SKU part number ... the group. Is there way to do that by making it a rule-based group?

asked Mar 11 by RayBilyk (290 points)
0 votes
1 answer

Using the powershell module, I know how to create a scheduled task, and also how to bind to a scheduled task that is already known. I also have used code to try creating ... same time as another. These are all one-time tasks and will be removed once executed.

asked Jan 19, 2024 by aweight (80 points)
0 votes
1 answer

Hello! how do i manage do get adaxes to remove all groups from the user after one month? We have a Business Rule where you can add an end of Date when the Account ... value field the powershell script works but not with the +1 Month. Thanks for your help!

asked Jun 14, 2023 by eww ag (140 points)
0 votes
1 answer