Solved

Powershell Get-ADUser URL field

Posted on 2011-09-19
7
1,342 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
  • 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
Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Join & Write a Comment

This article will help you understand what HashTables are and how to use them in PowerShell.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

743 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

10 Experts available now in Live!

Get 1:1 Help Now