> This will not get the users Primary group or any nested groups

As of v1.1 Get-QADGroupMember has a parameter -Indirect which, when specified 
expands nested group objects in addition to objects that are direct members of 
the group. 

It also has some facilities for primarys-

$group = Get-QADGroup group -ip primaryGroupToken
Get-QADObject -ldapFilter "(primaryGroupID=$($group.primaryGroupToken))"


To consider primary group in member of:

$user = Get-QADUser user -ip primaryGroupID
Get-QADGroup -ldapFilter "(primaryGroupToken=$($user.primaryGroupID))"


From: KenM [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2008 9:57 AM
To: NT System Admin Issues
Subject: Re: AD reports

Just a word of warning if you decide to use this. This will not get the users 
Primary group or any nested groups the users may belong to. I do not know PS 
well enough to tell you how to get those but would be interested to see how 
this is done with PS if anyone knows.


On Thu, Jun 12, 2008 at 12:06 PM, Steven Peck <[EMAIL PROTECTED]> wrote:
With PowerShell and the Quest AD cmdlets it would be more along the lines of

------------
$user = "juser"
(get-QADuser $user ).memberof | get-qadgroup | select-object Name |
export-cvs ./report.csv
-------------

To do all the users you could loop through them from a list or an AD
query with Get-QADuser.  If you used the list you would avoid random
service accounts, unless your users are in a specific OU and you did
the Get-QADuser on that specific OU.

Steven Peck
http://www.blkmtn.org

On Thu, Jun 12, 2008 at 8:13 AM, Eric Woodford <[EMAIL PROTECTED]> wrote:
> I've used this tool with decent success.. I think it is more Exchange
> focused, but might do your job for AD groups too.. Otherwise PowerShell and
> something like get-qadGroup "Groupname" could do it in a rough format..
>
> http://www.imanami.com/products/smartr/
>
> On Thu, Jun 12, 2008 at 7:58 AM, wjh <[EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>>
>> We have a client that will require quarterly reports regarding AD users
>> and the groups to which they belong.  Is there an easy and possibly free
>> tool out there to provide a legible list of users and the groups the user is
>> in.  This isn't any big enterprise AD environment.  Only about 30 users who
>> are currently on an SBS.  I know there are a couple of dsquery commands that
>> will list users and groups, but that doesn't really seem to get me very
>> close to providing a list that basically says this user has these
>> memberships, this user has these memberships, and have it organized by OU.
>>  I just don't want to spend a few hours exporting the info and cutting and
>> pasting to a report so that it is discernible to someone else outside of the
>> AD admin...especially if they will require this quarterly.
>>
>> Thanks for any help.
>>
>> Bill
>>
>> ~ Upgrade to Next Generation Antispam/Antivirus with Ninja!    ~
>> ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm>  ~
>
>

~ Upgrade to Next Generation Antispam/Antivirus with Ninja!    ~
~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm>  ~


~ Upgrade to Next Generation Antispam/Antivirus with Ninja!    ~
~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm>  ~

Reply via email to