Author Posts

August 12, 2018 at 1:26 pm

Hi All,

I am new to powershell. I am trying my best to come up with a script to get membership details of a subgroup along with the account details. My head is spinning all around to get this. Could anyone of you help me with this. Below is what i have right now.

Get-ADGroupMember "-app-InsuranceRefunds-UK" -Identity $($ -Recursive | %{Get-ADUser $_ -properties displayname,Enabled} | Select samaccountname,displayname | Export-Csv C:\Temp\allthegroups.csv

Group——>members details ( there are groups in this as well)

subgroups that are part of member of the primary group——member details of this subgroup and so on

with the account status, whether it is enabled or disabled.

Thank You


August 12, 2018 at 3:22 pm

Reporting on Active Directory is something that just about everyone needs and there are bunch of Active Directory reporting tools built in Powershell to get what you want. There are probably millions of threads asking what you are attempting to do. My recommendation is to do some research and test some solutions in a dev environment to see if it will meet your needs. An example:

Reporting scripts can be basic to super-advanced, but even reading them should help you with your logic and probably things you were not even thinking about.