Power shell script that can check each group if there is a nested group. Remove it and add those nested group members into the main group.
Say i have 10 groups in an OU.
When run need to check each group.
If group A has 5 users and 1 group then check all members within that group and add them to group A and then remove the group thats nested.
need a log to show what the changes were done.
Can anyone help me with this..