Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBA & LDAP Query get object's properties

Posted on 2014-01-22
4
Medium Priority
?
1,099 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

597 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