I have found the script to force membership updates for all rule based groups, but is there a script to force update a specific rule based group?

I am looking to add a user to a manually assigned group and based on a business rule, I would like to trigger a rule based group that adds members of the manual group.

Thanks

by (840 points)

1 Answer

by (15.9k points)
+1 vote

Hello,

To force the membership update of a rule-based group in a script, you need to bind to the group first. Then call the UpdateMembershipNow method on the group object. For details and a script example, have a look at the corresponding section of the following SDK article: https://www.adaxes.com/sdk/IAdmGroup2/#UpdateMembershipNow_details.

by (840 points)
0

Thank you, works perfectly.

Related questions

Receive "Index operation failed; the array index evaluated to null. Stack trace: at , : line 104>" and "Index operation failed; the array index evaluated to null. ... Found $GroupName, $GroupDN." } } #foreach write-output "" Write-Output "" Stop-Transcript

asked Apr 14, 2022 by jbahou (20 points)
0 votes
1 answer

Hi, I would like to exclude users from a rule-based group where distinguishedName contains "Special". Any possibility to achive this?

asked Jul 4, 2023 by wintec01 (2.2k points)
0 votes
1 answer

Update group membership based on one property values. I am trying to find a script that resembles "Update group membership based on two property value" but just for one value.

asked Apr 7, 2022 by lee_thomas (20 points)
0 votes
1 answer

I am trying to build a custom command to add a specific user to a rule based group in adaxes and I am curious if it is something we can use the API to complete?

asked Mar 7 by Brian (40 points)
0 votes
1 answer

Hi, I need business rule that will forbid changing group membership type to rule-based for selected groups. Additionally I need PowerShell script for adding more groups to be watched by this rule. Thanks in advance!

asked Mar 9, 2023 by KIT (1.0k points)
0 votes
1 answer