Solved

LDAP query

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

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