dsquery + dsget question
hi all,
we have ou in our domain holds bunch of universal distribution groups. i'm trying use command combines dsquery dsget list of members of group , group names. example:
dsquery group ou=test,dc=contoso,dc=com | dsget group -members
the above command lists of members each group doesn't list name of group well. ideas on how sneak name of groups in output well?
any appreciated, thanks.
it can done powershell ad cmdlets. acceptable?
$groups = get-adgroup -searchbase "ou=sales,dc=mydomain,dc=com" -filter * foreach ($group in $groups) { $dn = $group.distinguishedname "group: $dn" $members = get-adgroupmember -identity $dn foreach ($member in $members) { " member: " + $member.distinguishedname } }
richard mueller - mvp directory services
Windows Server > Directory Services
Comments
Post a Comment