Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active Directory QUERY of PRINTERS

Status
Not open for further replies.

olorean

Programmer
Dec 5, 2002
13
0
0
US


I can query against any and all users in Active Directory, but I am not able to see a list of the printers.

In the GUI interface "Active Directory Users and Computers" I can see a full list of all Printers on the server.

How is this done Quirying the server?
 
How did you queried the server? LDAP commands? How is looking that command? Gia Betiu
giabetiu@chello.nl
Computer Eng. CNE 4, CNE 5, soon MCSE2k
 
SQLStmt = "SELECT distinguishedName FROM " & _
"'LDAP://Domaindc55:389/DC=location,DC=company,DC=com' " & _
"WHERE objectClass = '*' AND type='Printers'"

I am not sure if I should be setting some type of Object Class, or some type of ou, or dn.

I am very new at this, and trying to fight my way around ldap commands.

Using the above syntax, I am able to retreive end user information, including phone numbers, and email addresses.

Now I need to focus on what printers are on the system.

Any help would be greatly appreciated.
 
I'm not sure if it has an objectType and objectCategory too.
Read this article too:

And, the best way is to see how the schema is looking, then you will know what attributes you have to check.
(you know, use regsvr32 Schmmgmt.dll then you will have in mmc snapin "Active Directory Schema"). And, i know thatin ResourceKit there are some other tools too (don't remember now their name, but I think ADSI edit, will show you how the current objects are represented). Gia Betiu
giabetiu@chello.nl
Computer Eng. CNE 4, CNE 5, soon MCSE2k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top