Solved

Powershell Get-ADUser URL field

Posted on 2011-09-19
7
1,407 Views
Last Modified: 2012-05-12
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
Comment
Question by:rsn-helpdesk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 27

Expert Comment

by:KenMcF
ID: 36562966
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
 

Author Comment

by:rsn-helpdesk
ID: 36562995
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
 
LVL 13

Expert Comment

by:Govvy
ID: 36563012
Use Quest AD Module and run:

>Get-QADUser -objectAttributes @[www}
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:rsn-helpdesk
ID: 36563089
Govvy, that still doesn't export the URL field.
0
 
LVL 27

Expert Comment

by:KenMcF
ID: 36563114
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
 

Author Comment

by:rsn-helpdesk
ID: 36563128
KenMcF: For most, there is only 1 url attribute. Very few have 2 url attributes.
0
 
LVL 13

Accepted Solution

by:
Govvy earned 500 total points
ID: 36563193
Change the output to csv type on this command:

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A brief introduction to what I consider to be the best editor for PowerShell.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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