0 votes

Is it possible to script having users added (or removed) from a Security Group based on another AD Attribute?

I have found ways to do this in Powershell (something like):
# Get the ad cmdlets imported
import-module ActiveDirectory
# Clear all current members of NoInternet Group
get-adgroupmember No_Internet_GG | %{remove-adgroupmember No_Internet_GG $_.SamAccountName -Confirm:$false}
# Add all No Internet users to a Group
get-aduser -filter{city -like "No Internetville"} | %{Add-ADGroupMember No_Internet_GG $_.SamAccountName}

but I wanted to see if this is possible with an Adaxes script.

For instance, if a user has a location AD attribute of CA, I want them added to the LOCATION_CA AD security group. If they relocate to CO, I want them to be removed from the LOCATION_CA group and added to the LOCATION_CO group. The script would then run in a timed fashion, weekly. Alternatively, the script could just delete all members of the LOCATION_CA group on a weekly basis and then re-populate it based on the location AD attribute.

Or should I just utilize the PS script and just run it through Adaxes on a timed fashion?

Thanks!

by (360 points)

1 Answer

0 votes
by (215k points)
selected by
Best answer

Hello,

Have a look at the following tutorial: http://www.adaxes.com/tutorials_Automat ... cripts.htm.

0

Excellent, thank you!

Related questions

0 votes
0 answers

I am trying to find a way to create Groups based off an OU and a list of options (check boxes) within the portal For example: Select the Target OU to add groups ... 3 - Remote Administrators Option 3 - Remote Developers Option 4 - Readers Option 4 - Writers

asked Sep 11, 2020 by dknapp (100 points)
0 votes
1 answer

Hallo! a very interesting feature would be the capability for a user to add herself to a security group directly from inside the Self service interface, as it is already possible for distribution lists. How can be implemented this? regards, Giovanni

asked Jun 17, 2012 by gbar (20 points)
0 votes
1 answer

I am trying to create a business rule to send an email to the manager of the group when a member is added or removed from a rule-based group. I have created the business rule and it works for other groups but not for a rule-based group. Can this be done?

asked Jul 19 by mark.it.admin (1.6k points)
0 votes
0 answers

Our users accounts are on-prem & synched through DirSync. Our distribution groups are cloud based only. What's the best way to automatically to accomplish these task? 1. ... the list being up to date if an account is created outside of adaxes) Thanks

asked Apr 27, 2015 by auser42 (340 points)
0 votes
0 answers

I can get the name ("cn") of the group but I am getting null for hubId ("adm-CustomAttributeText1"). What am I doing wrong here? var parentContainer = (IADsContainer) ... hubId = group.Get("adm-CustomAttributeText1").ToString(); } catch { } } } Thanks!

asked Dec 6, 2018 by mark.munson (120 points)
2,572 questions
2,315 answers
6,171 comments
742,306 users