Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

need to generate UPN for an OU - dirsync office 365

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

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 44

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 44

Accepted Solution

by:
Vasil Michev (MVP) earned 2000 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

Lessons on Wi-Fi & Recommendations on KRACK

Simplicity and security can be a difficult  balance for any business to tackle. Join us on December 6th for a look at your company's biggest security gap. We will also address the most recent attack, "KRACK" and provide recommendations on how to secure your Wi-Fi network today!

Question has a verified solution.

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

With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
If you have come across a situation where you need to find some EDB mailbox recovery techniques, then here you will find the same. In this article, we will take you through three techniques using which you will be able to perform EDB recovery. You …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

877 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