sedberg1
asked on
Script to delete a user
I have a very small script that pulls the group membership for a user:
dsget user UserDN -memberof
What I wanted to do was pull the results of that script, which are the group DNs, into some type of script that would remove the user from those groups. This command will remove the user from the group. But how would I get just one script to do all of it?
dsmod group GroupDN -rmmbr UserDN
Any suggestions would help.
dsget user UserDN -memberof
What I wanted to do was pull the results of that script, which are the group DNs, into some type of script that would remove the user from those groups. This command will remove the user from the group. But how would I get just one script to do all of it?
dsmod group GroupDN -rmmbr UserDN
Any suggestions would help.
I recommend using PowerShell (and PS scripts), which is good for cases like this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.