Hi chris,

Yes, sorry for that

Add an ldap filter to Get-QADGroup to return none empty groups only:

Get-QADGroup -sizeLimit 0 -ldap '(member=*)' | select ...



---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic





c> Actually..take that back. Got it to run. Only question is now...it
c> looks to hate empty group as it gives this err
c>
c> Select-Object : Cannot expand property "members" because it has
c> nothing to
c> expand.
c> At line:1 char:35
c> + Get-QADGroup -sizeLimit 0 | select <<<<
c> @{name="GroupName";expression={$_.name}} -expand members | select
c> GroupName,
c> @{n='Member';e={ (Get-QADObject $_).name
c> I'll play w/ it too..And, again. Thanks!!!
c> "Chris" wrote:

>> Shay,
>> Thanks for the post and help as well. But, when trying to run your
>> script,
>> it is only pulling groups. Your output is the exact format I'm
>> looking to
>> accomplish tho!!
>> Thanks!
>> --Chris
>> "Shay Levy [MVP]" wrote:
>>

>>> Hello chris,
>>>
>>> Here's another way (one line):
>>>
>>> PS > Get-QADGroup -sizeLimit 0 | select
>>> @{name="GroupName";expression={$_.name}} -expand members | select
>>> GroupName,@{n='Member';e={ (Get-QADObject $_).name }}
>>>
>>> GroupName Member
>>> --------- ------
>>> Group1 User1
>>> Group1 User1
>>> Group2 User2
>>> Group2 User2
>>> Group3 User3
>>> Group3 User3
>>> ---
>>> Shay Levy
>>> Windows PowerShell MVP
>>> http://blogs.microsoft.co.il/blogs/ScriptFanatic
>>> c> I'm having problems (most of which are being new to powershell!)
>>> in
>>> c> grabbing a list of all groups-users in a domain.
>>> c>
>>> c> I have played a bit w/ Quest's Active Directoy cmdlets and came
>>> up w/
>>> c> the
>>> c> following:
>>> c> get-qadgroup |
>>> c> foreach-object {get-qadgroupmember ($_)}
>>> c> This, techncially does what it is suppose to do.... For every
>>> group,
>>> c> it lists the members. But, the problem is, it doesn't state the
>>> c> group name!!
>>> c>
>>> c> I simple need to get a dump from AD off all group and
>>> memberships.
>>> c>
>>> c> Thanks!
>>> c>