I am new to powershell and I have to create a script to do the following :
I need to get a list of AD groups and extract the users in a CSV file. I can do that fine but I don’t know how to divide the users by AD groups in the CSV file.
I have the below script but all the users are listed together :
When you post code or error messages or sample data or console output format it as code, please.
In the “Text” view you can use the code tags “PRE“, in the “Visual” view you can use the format template “Preformatted“. You can go back edit your post and fix the formatting – you don’t have to create a new one.
Thanks in advance.
If I understood you correctly, I think this will do it.