![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| | |||||||
| |
| 01-30-2008 | #1 (permalink) |
| | Get Group Membership for a User I am trying to use the Quest AD stuff to get all of the groups a particular user belongs to. I am getting errors if I try to pipe the get-qadgroup after doing a get-qaduser -identity USERNAME Anybody got an idea? |
| My System Specs |
| 01-30-2008 | #2 (permalink) |
| | Re: Get Group Membership for a User On Jan 30, 10:06 pm, LE2 Strat <LE2St...@xxxxxx> wrote: Quote: > I am trying to use the Quest AD stuff to get all of the groups a particular > user belongs to. > > I am getting errors if I try to pipe the get-qadgroup after doing a > get-qaduser -identity USERNAME > > Anybody got an idea? $strUser.memberof -aleksandar http://powershellers.blogspot.com |
| My System Specs |
| 01-30-2008 | #3 (permalink) |
| | Re: Get Group Membership for a User Do you want this recursive (i.e. do you want to see every group that the user belongs to through direct and indirect membership)? Or do you only need to know what groups the user is a direct member of? Also, are you concerned about dynamic query-based DLs (which won't show up in the .memberOf property) or just regular security and distribution groups? -- Kirk Munro [MVP] Poshoholic http://www.poshoholic.com "LE2 Strat" <LE2Strat@xxxxxx> wrote in message news:40C1F55B-F5C5-429C-B420-3102ED4D6252@xxxxxx Quote: > I am trying to use the Quest AD stuff to get all of the groups a > particular > user belongs to. > > I am getting errors if I try to pipe the get-qadgroup after doing a > get-qaduser -identity USERNAME > > Anybody got an idea? |
| My System Specs |
| 01-31-2008 | #4 (permalink) |
| | Re: Get Group Membership for a User Just the groups that the user is a direct member of (If that group is nested inside another group, I don't see to see that informaiton). Just the security/distributions groups a member is directly a member of. "Kirk Munro [MVP]" wrote: Quote: > Do you want this recursive (i.e. do you want to see every group that the > user belongs to through direct and indirect membership)? Or do you only > need to know what groups the user is a direct member of? > > Also, are you concerned about dynamic query-based DLs (which won't show up > in the .memberOf property) or just regular security and distribution groups? > > -- > Kirk Munro [MVP] > Poshoholic > http://www.poshoholic.com > > "LE2 Strat" <LE2Strat@xxxxxx> wrote in message > news:40C1F55B-F5C5-429C-B420-3102ED4D6252@xxxxxx Quote: > > I am trying to use the Quest AD stuff to get all of the groups a > > particular > > user belongs to. > > > > I am getting errors if I try to pipe the get-qadgroup after doing a > > get-qaduser -identity USERNAME > > > > Anybody got an idea? > |
| My System Specs |
| 01-31-2008 | #5 (permalink) |
| | Re: Get Group Membership for a User Ok, then Alexandair's approach should give you what you want. If you want more than just the distinguished names of those groups, you can pipe the memberOf list to Get-QADGroup, like this: $user = Get-QADUser 'Poshoholic' $user.memberOf | Get-QADGroup This will take each of the distinguished names in memberOf and pass them along the pipeline to Get-QADGroup one at a time. Get-QADGroup accepts a distinguished name of a group as input, so this allows it to retrieve the actual AD group object with all of it's properties. Note that you will only see three properties in the output of this script: name, type and dn. If you want to see all properties that are available, you can do this: $user.memberOf | Get-QADGroup | Format-List * | more Note that this will generate a lot of output. -- Kirk Munro Poshoholic http://www.poshoholic.com "LE2 Strat" <LE2Strat@xxxxxx> wrote in message news 94B48E1-3FF7-4E35-8940-FE8B3FBDED11@xxxxxxQuote: > Just the groups that the user is a direct member of (If that group is > nested > inside another group, I don't see to see that informaiton). Just the > security/distributions groups a member is directly a member of. > > "Kirk Munro [MVP]" wrote: > Quote: >> Do you want this recursive (i.e. do you want to see every group that the >> user belongs to through direct and indirect membership)? Or do you only >> need to know what groups the user is a direct member of? >> >> Also, are you concerned about dynamic query-based DLs (which won't show >> up >> in the .memberOf property) or just regular security and distribution >> groups? >> >> -- >> Kirk Munro [MVP] >> Poshoholic >> http://www.poshoholic.com >> >> "LE2 Strat" <LE2Strat@xxxxxx> wrote in message >> news:40C1F55B-F5C5-429C-B420-3102ED4D6252@xxxxxx Quote: >> > I am trying to use the Quest AD stuff to get all of the groups a >> > particular >> > user belongs to. >> > >> > I am getting errors if I try to pipe the get-qadgroup after doing a >> > get-qaduser -identity USERNAME >> > >> > Anybody got an idea? >> |
| My System Specs |
| Thread Tools | |
| |
| Similar topics to: Get Group Membership for a User | ||||
| Thread | Forum | |||
| Re: Enumerate User's AD Group Membership | VB Script | |||
| Re: Enumerate User's AD Group Membership | VB Script | |||
| Script to query user information based upon group membership | VB Script | |||
| Get group membership | PowerShell | |||
| Group Membership | Vista mail | |||