• New Patreon Tier and Early Access Content available. If you would like to support AVForums, we now have a new Patreon Tier which gives you access to selected news, reviews and articles before they are available to the public. Read more.

Exporting a list of printers.

Setenza

Prominent Member
I'm trying to collate a comprehensive list of printers in AD. I need details such as name, model, location and IP address.

I can produce a list onscreen by Start > Settings > Printers and faxes > Add a printer > Find a printer in the directory > Find Now

This has all the details that I need. However, you cannot export the data.

Is there some other way I can do this?

I have access to the print server via RDP

Alternatively, can someone recommend a 3rd party audit piece of software to remotely collate this information.

Cheers for any help.

XoD.
 

imightbewrong

Distinguished Member
Do you have access to VB script to do it? If so, Google has the answer:

http://www.activexperts.com/activmonitor/windowsmanagement/scripts/printing/printerport/#LAPP.htm

List All Published Printers

Returns a list of all the printers published in Active Directory.

Const ADS_SCOPE_SUBTREE = 2

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = "Select printerName, serverName from " _
& " 'LDAP://DC=fabrikam,DC=com' where objectClass='printQueue'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst

Do Until objRecordSet.EOF
Wscript.Echo "Printer Name: " & objRecordSet.Fields("printerName").Value
Wscript.Echo "Server Name: " & objRecordSet.Fields("serverName").Value
objRecordSet.MoveNext
Loop
 

Setenza

Prominent Member
I have very limited access rights on the network.

The script would've be ideal, but not in this situation.

As I stated earlier, I can see all the details I need on the screen, but cannot find a way to export it.
 

The latest video from AVForums

SVS Prime Wireless Pro Powered Speakers - Review Coming Soon
Subscribe to our YouTube channel
Support AVForums with Patreon

Top Bottom