Solved

need to generate UPN for an OU - dirsync office 365

Posted on 2014-11-10
5
107 Views
Last Modified: 2014-11-21
need to generate a report an OU
0
Comment
Question by:Jorge Ocampo
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:Vasil Michev (MVP)
ID: 40433234
Some more details on what you are trying to achieve might help...
0
 
LVL 2

Author Comment

by:Jorge Ocampo
ID: 40440697
trying to get the upn of users inside an OU
0
 
LVL 39

Expert Comment

by:Vasil Michev (MVP)
ID: 40440733
Get-ADUser -Filter * -SearchBase "OU=Test,DC=domain,DC=com" | select UserPrincipalName

Open in new window


If you want to export the list to CSV:

Get-ADUser -Filter * -SearchBase "OU=Test,DC=domain,DC=com" | select UserPrincipalName | Export-CSV -nti C:\users.csv

Open in new window

0
 
LVL 2

Author Comment

by:Jorge Ocampo
ID: 40440783
how do i get the name of an OU for example "OU=Test,DC=domain,DC=com" im in aduc right now
0
 
LVL 39

Accepted Solution

by:
Vasil Michev (MVP) earned 500 total points
ID: 40440813
Make sure advanced options are selected under View. Right-click on the OU object in ADUC, select properties. Go to the Attribute editor tab and look for the distinguishedName attribute.

Or do it with PowerShell:
Get-ADOrganizationalUnit -Filter {Name -like "Test"} | ft *Name

Open in new window

0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
Find out what you should include to make the best professional email signature for your organization.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now