?
Solved

LDAP query

Posted on 2007-12-03
1
Medium Priority
?
1,443 Views
Last Modified: 2008-05-30
I am trying to run a query using Active Directory and I need the following information:

A breakdown of each server by name with logon user id (last logged on user)
# of computers (desktops and laptops) with computer name and log on user id (last logged on user)
# of printer queues with queue name and server name where the print queue is in.

I was able to pull the following information from AD using these queries:

-For servers:(&(objectCategory=computer)(!operatingSystem=Windows XP Professional)(!operatingSystem=Windows XP Tablet Edition)(!operatingSystem=Windows 2000 Professional))

-For workstations:(&(objectCategory=computer)(!operatingSystem=Windows 2003 Server)(!operatingSystem=Windows 2000 Server)(!description=Virtual Server Account))

-For printers:(&(objectCategory=printQueue)(serverName=*))
0
Comment
Question by:DAMAdmin
[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
1 Comment
 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 2000 total points
ID: 20398783
Last logged on username isn't stored in AD, you'll need to use WMI to poll each workstation individually.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

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