Hello
I am trying to create an export with all members from a group.
But I wan’t not only the members i want also the groups in this specific group in a list.
My script only shows the users but i don’t find the nested groups in this specific group.
Can someone please help me.
It would be nice to have posibility to export both in one script Users and the groups in a specific group. I have a mix in the AD, I finde groups which only have users and i find groups which have other groups (nested).
When you use the parameter -Recursive PowerShell drills down into all nested groups. You should omit this parameter and check the object class of the members of the group to distinguish the users from the groups.
BTW: Could you please format your code as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance.
Hello Olaf
Next Time I will do it right with the code.
I am still not able to modifie the code to get users and groups in the same export, which are in the “register” members.
Guess I need an example.
Greetings
Depending on the amount of groups and the depth of nested groups in your AD and on your enthusiasm you could turn it into a recursive function or you “drill down” into the nested groups manually and piece it together with an Export-Csv -Append.
We all have been at that point. And we all do not know everything. In the vast majority of the cases you’re not the first with a given challenge. Use your favorite internet search engine and search for it. It’ll probably take you just seconds to find some helpful information.