• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1549
  • Last Modified:

Powershell Get-ADUser URL field

I am trying to export some data from AD using powershell. Need the following information:

Firstname, lastname, email, phone, company, url

I can pull all the data above except for the URL field. It displays on screen, but doesn't export. I have:

get-aduser -Properties givenname,surname,enabled,emailaddress,office,officephone,url | export-csv test.csv
0
rsn-helpdesk
Asked:
rsn-helpdesk
  • 3
  • 2
  • 2
1 Solution
 
KenMcFCommented:
use wwwhomepage

get-aduser -Properties wwwhomepage, givenname,surname,enabled,emailaddress,office,officephone | Select wwwhomepage, givenname,surname,enabled,emailaddress,office,officephone | export-csv test.csv
0
 
rsn-helpdeskAuthor Commented:
Clarifying... URL is Web Page Other, and not the same as wwwhomepage. When you display on screen the URL field, it displays, but for some reason it won't export to csv. I assume because you can have multiple URL fields?
0
 
GovvyCommented:
Use Quest AD Module and run:

>Get-QADUser -objectAttributes @[www}
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
rsn-helpdeskAuthor Commented:
Govvy, that still doesn't export the URL field.
0
 
KenMcFCommented:
yeah, that is a multi valued attribute. It is a little harder to get them into a csv file. Do users have more than 1 url attribute? I can post something later tonight if no one posts before that

0
 
rsn-helpdeskAuthor Commented:
KenMcF: For most, there is only 1 url attribute. Very few have 2 url attributes.
0
 
GovvyCommented:
Change the output to csv type on this command:

>Get-QADUser -DontUseDefaultIncludedProperties -ObjectAttributes @{homeDirectory='*'} -IncludedProperties 'url' | fl url
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now