Solved

VBA & LDAP Query get object's properties

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

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