VBA & LDAP Query get object's properties

Posted on 2014-01-22
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: Workstations 7/ Workstations 7 Lite/ XP Workstations/ XP Workstations/SMZ XP Lite Client Base Workstations XP Workstations/SMZ XP Lite Client Base Workstations/SMZ XP Lite Client Shared User Workstations/
Question by:DoubleLeft
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
LVL 65

Accepted Solution

RobSampson earned 500 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.



Author Comment

ID: 39805580
Thank you so much!

Author Closing Comment

ID: 39805585
Thank you so much!
LVL 65

Expert Comment

ID: 39805597
No problem. Thanks for the grade.

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

726 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