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 (216k 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
1 answer

Is it possible to create a business unit and have it auto populate with group owners in a specific OU. I've tried a few scripts to get propertie adm-managedbylist but none have worked so far.

asked Nov 18 by C27 (20 points)
0 votes
1 answer

I'm trying to automate adding users who are enrolled in MFA to an AD group. The scripts I found elsewhere here that do not work so I believe they may have been written against a prior Adaxes version or referencing a report that does not meet our needs.

asked May 31 by neal (50 points)
0 votes
1 answer

Is it possible to add a user to a group based on hardware ? There are users with a Windows device and a MacOS device. I want to be able to choose this when ... the user via Adaxes and automatically link them to a specific group based on the chosen hardware.

asked Apr 16 by Cas (200 points)
0 votes
1 answer

This is for license purposes and we do not want them visible in the Adaxes portal.

asked Oct 22, 2021 by jfrederickwl (20 points)
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)
3,588 questions
3,277 answers
8,303 comments
548,079 users