Hey Folks,
I have a Problem with my Powershell script...
I like to filter all users who are responsible ("ManagedBy Attribute" in the AD) for some Groups in my active Directory. I've done this by:
$managedByUsers = Get-ADGroup -filter{name -like '*DFS-IST-*'} -properties info, member, ManagedBy | Group-Object ManagedByThen I get all Groups where a user is responsible for, like in the Picture, User 1 is responsible for DFS-I-Test1 and DFS-I-Test2:
But now I have to work with those Groups, like in the following pseudo code:
FOREACH $managedByUsers.name{
FOR EACH $managedByUsers.Group{
Do something A: Here I have to work with the Name of each Group, filtering some informations out of the AD and handle the next group}
Then Do something B
AND
Take The Next $managedByUsers.Name until all of them are handled
}
}
I hope you understand what I'm trying to do and someone can help me...! Thanks a lot!