Jump to content

Recommended Posts

Posted
I want to export a list of users name and their job title, I've never used powershell before, any info on how I extract this and put it onto a CSV file would be most appreciated.
Posted (edited)

You can use the following to export. Just make sure you set the right OUs and domain

 

Get-ADUser -Filter * -SearchBase "OU=xxx,DC=xxx" -Properties * | Select-Object DisplayName, Title | export-csv -path c:\temp\output.csv

Edited by DangerousDaveUK
  • Thanks 1
Posted
The get AD-User is the way, but -filter * - properties * is a pet hate (see my previous posts on this) get the properties you need the select statement ('Select-Object DisplayName, Title') has the properties that you are after...
  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...