Search This Blog

Friday, June 07, 2013

NON-LVR groupmembers - how to change them

After I had removed the groups I didn't want to refresh the group membership in, I ended up with a textfile called refresh.txt as input file.

I ended up using this command in a command prompt to re-add the users in the groups from this file.

for /F "delims=" %f in (refresh.txt) do dsget group %f /members | dsmod group %f /chmbr

Things you must take into consideration is that if you do this on many groups with many members, it will start a lot of replication. So, you might want to split the list into multiple smaller lists to not affect the network too much.

5 comments:

Noah James Skaaning Durrands said...

Jimmy, could you help me still with this issue?
Is there an attribute in the AD against the group for LEGACY and then this attribute will change once converted to LVR?

Noah James Skaaning Durrands said...

Jimmy, could you help me still with this issue?
Is there an attribute in the AD against the group for LEGACY and then this attribute will change once converted to LVR?

Jimmy Andersson [DS MVP] said...

I posted how I did it here:http://www.jimmytheswede.blogspot.se/2013/06/non-lvr-groupmembers-how-to-find-them_10.html

As well as in the thread in the Forum.

Best regards,
/Jimmy

Anonymous said...

Hello Jimmy.

Many thanks on this, I'm so glad i found it on your blog.

I've been following your steps piece by piece, and I'm down to one of the last steps; that is "NON-LVR groupmembers - how to change them" i.e. http://jimmytheswede.blogspot.com/2013/06/non-lvr-groupmembers-how-to-change-them.html

However, you start from this assumption : "I ended up using this command in a command prompt to re-add the users in the groups from this file.
" While I actually ended up with a folder containing 1800 seperate files, the groups that contain LEGACY.

I kinda need to end up with a new list as well like you, so I can run the dsmod against it to finalize.

My original grouplist.txt contained 3500 groups and the new fodler contains 1800 loose text files that I want to reconstruct in to a more limited grouplist.txt; I'm sure you know what I mean.

Please post or contact me on aedron@outlook.com;

Your blog is awesome.


Greetings,

Aedron

Jimmy Andersson [DS MVP] said...

Hi,
My friend Simon Wåhlin has created a function in Powershell that will do this in a much easier way. Check it out here: http://blog.simonw.se/list-active-directory-non-lvr-group-members/