Re: Query disabled users and delete their memberof associations



I had a similar request for this, but in my case "they" wanted to keep the
membership somewhere so that it could easliy be retained. I took a
developer aside and told him this (this isn't pretty, but we had certain
security requirements and political crap that had to be dealt with):

Write some code that does the following:

-- Takes the user's sAMAccountName as input
-- Grab the memberOf attribute and dump the contents into an array
-- Disable the user object
-- Get the RID of each group in the array, and concatenate into a semi-colon
delimited string value.
-- Write that value to an unused string attribute of the user.
-- If the string is > 1000 characters, split it and use another attribute.
-- Connect to each group in that list and remove the user object.


We had three attributes that would be used for this.

It hasn't been implemented yet.

LOL.


As others have said, you need to code this.

--
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net




.



Relevant Pages

  • Re: Query disabled users and delete their memberof associations
    ... membership somewhere so that it could easliy be retained. ... -- Get the RID of each group in the array, ... -- Write that value to an unused string attribute of the user. ... -- Connect to each group in that list and remove the user object. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Query disabled users and delete their memberof associations
    ... the user DNs as an array into this vbscript. ... WScript.Echo "No Group Memberships Found" ... -- Write that value to an unused string attribute of the user. ... -- Connect to each group in that list and remove the user object. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Query disabled users and delete their memberof associations
    ... Hey Paul do you have multiple domains and use domain local groups? ... -- Get the RID of each group in the array, and concatenate into a semi-colon delimited string value. ... -- Connect to each group in that list and remove the user object. ...
    (microsoft.public.windows.server.active_directory)
  • Re: wtf?
    ... > like this *really* can't be shown in isolation. ... public string UserID ... basically there are several applications consuming a class library. ... a classic example is when a user object insert fails because the the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Update Notes Field
    ... ' This is where the user object will reside. ... Microsoft VBScript compilation error: terminated string constant. ... you update the Notes field in Active Directory for Users and Computers ... Apparently any non-display characters require that the entire value be ...
    (microsoft.public.windows.server.active_directory)