?
Solved

VBA & LDAP Query get object's properties

Posted on 2014-01-22
4
Medium Priority
?
1,064 Views
Last Modified: 2014-01-23
Need a function! It gets computer name and returns property from Active Directory on my choice like description or whenCreated.

I have several OU to look into so all of them are needed to be put into the code of function:
eur.mydomain.com/FRP/SMZ/SMZ Workstations 7/
eur.mydomain.com/FRP/SMZ/SMZ Workstations 7 Lite/
eur.mydomain.com/FRP/SMZ/SMZ XP Workstations/
eur.mydomain.com/FRP/SMZ/SMZ XP Workstations/SMZ XP Lite Client Base Workstations
eur.mydomain.com/FRP/SMZ/SMZ XP Workstations/SMZ XP Lite Client Base Workstations/SMZ XP Lite Client Shared User Workstations/
0
Comment
Question by:DoubleLeft
[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
  • 2
  • 2
4 Comments
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 39804893
Hi, have a look at this macro enabled workbook.  If you put your computer name in column A, and the attribute names you want in row 1, then run the GetData sub, it will populate those cells with the information for each computer.

Regards,

Rob.
Get-Computer-Attributes-From-Nam.xlsm
0
 

Author Comment

by:DoubleLeft
ID: 39805580
Thank you so much!
0
 

Author Closing Comment

by:DoubleLeft
ID: 39805585
Thank you so much!
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 39805597
No problem. Thanks for the grade.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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