Solved

LDAP query

Posted on 2007-12-03
1
1,436 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
1 Comment
 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 500 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

Resolve DNS query failed errors for Exchange
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlleā€¦
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

773 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