Solved

need to generate UPN for an OU - dirsync office 365

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

Expert Comment

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

Author Comment

by:Jorge Ocampo
Comment Utility
trying to get the upn of users inside an OU
0
 
LVL 38

Expert Comment

by:Vasil Michev (MVP)
Comment Utility
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
Comment Utility
how do i get the name of an OU for example "OU=Test,DC=domain,DC=com" im in aduc right now
0
 
LVL 38

Accepted Solution

by:
Vasil Michev (MVP) earned 500 total points
Comment Utility
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

The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article will help you understand what HashTables are and how to use them in PowerShell.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

772 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

15 Experts available now in Live!

Get 1:1 Help Now