Solved

VBA & LDAP Query get object's properties

Posted on 2014-01-22
4
1,024 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 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.

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

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

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…
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 Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

733 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