$OU = "mydomain/myOU"
Get-QADUser -Searchroot $OU -Enabled `
| Select-Object -property 'title' `
| Get-QADMemberOf -Identity $OU `
| Export-Csv "C:\title.csv"
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
"phre...@hotmail.com" wrote:
> .
>