Solved

Powershell Get-ADUser URL field

Posted on 2011-09-19
7
1,376 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

831 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