![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | seeing all job titles and memberof groups for all user in particularOU As my subject states, this is what I'm trying to do. I can get the script to work for it to just show the job title but I'm trying to also have it list the memberof groups for each job title as well. not grouped together(though that would be awesome but way out of my league). just job title and in subsequest columns I would guess it would list each group that person(who doesn't need to be listed) is a part of. This is mainly to determine a baseline for a specific job title and what groups it should start out being a part of. here's what I have so far. If I take out line 4, it runs and shows the job titles. once I throw in like 4, the csv file is empty. any help would be much appreciated. $OU = "mydomain/myOU" Get-QADUser -Searchroot $OU -Enabled ` | Select-Object -property 'title' ` | Get-QADMemberOf -Identity $OU ` | Export-Csv "C:\title.csv" |
My System Specs![]() |
| | #2 (permalink) |
| | RE: seeing all job titles and memberof groups for all user in particul One thing that springs to mind is that you are trying to do a couple of things in your pipeline that don't really go together. This bit $OU = "mydomain/myOU" Get-QADUser -Searchroot $OU -Enabled ` | Select-Object -property 'title' is OK and will produce a list of job titles for every user in your OU. This bit | Get-QADMemberOf -Identity $OU ` won't work because to are using the OU as the identity rather than a user. OUs can't be memebrs of groups $OU = "mydomain/myOU" Get-QADUser -Searchroot $OU -Enabled ` | Get-QADMemberOf | Export-Csv "C:\title.csv" should give you a list of group memberships for each user. If you want title as well you probably need to do something like $OU = "mydomain/myOU" Get-QADUser -Searchroot $OU -Enabled ` | Select-Object -property 'title', memberof | Export-Csv "C:\title.csv" I think the user property that shows the group memebrships is memberof Check it and try -- Richard Siddaway All scripts are supplied "as is" and with no warranty PowerShell MVP Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "phreakers@newsgroup" wrote: Quote: > As my subject states, this is what I'm trying to do. I can get the > script to work for it to just show the job title but I'm trying to > also have it list the memberof groups for each job title as well. not > grouped together(though that would be awesome but way out of my > league). just job title and in subsequest columns I would guess it > would list each group that person(who doesn't need to be listed) is a > part of. This is mainly to determine a baseline for a specific job > title and what groups it should start out being a part of. here's what > I have so far. If I take out line 4, it runs and shows the job titles. > once I throw in like 4, the csv file is empty. any help would be much > appreciated. > > $OU = "mydomain/myOU" > Get-QADUser -Searchroot $OU -Enabled ` > | Select-Object -property 'title' ` > | Get-QADMemberOf -Identity $OU ` > | Export-Csv "C:\title.csv" > > > > . > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Adding a user to groups via dsadd | VB Script | |||
| AD: Looking for user not in a groups | PowerShell | |||
| Scripting user creation. BUT How to add to groups..... | VB Script | |||
| remove user from all groups but 1 | PowerShell | |||
| User Groups in Vista | Vista account administration | |||