Solved

LDAP query

Posted on 2007-12-03
1
1,434 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

Join & Write a Comment

Starting in Windows Server 2008, Microsoft introduced the Group Policy Central Store. This automatically replicating location allows IT administrators to have the latest and greatest Group Policy (GP) configuration settings available. Let’s expl…
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
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 tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now