![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: List all Group Users in AD 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: Quote: Quote: >> 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: >> Quote: >>> 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> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| list users, NOT members of a group | PowerShell | |||
| Problem copying list of contacts into a new group list | Vista mail | |||
| No users in Local Administrators Group | Vista security | |||
| List all Group Users in AD | PowerShell | |||
| list users in a local group on a distant computer | PowerShell | |||