Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

List all users and their OUs they belong to

$
0
0

Hi,

I would like to list all users with the OU they belong to and furthermore add an specific attribute that was added...

I can get both information separately:

get-aduser -SearchBase 'OU=DOMAIN,DC=mygroup,DC=re,DC=lan' | FT name

and

Get-ADOrganizationalUnit -SearchBase 'OU=DOMAIN,DC=mygroup,DC=re,DC=lan' -properties name,budgetanalytics | FT name,budgetanalytics

but I'd like to get the list containing user1, its OU, its budgetanalytics

Thanking you in advance,

Cédric


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>