How can i export printer details from multiple 2003 servers

I have a large number of 2003 server and for a project i require information on all the printers hosted on all of them. main details needed will be the printer name and the location fiellds. can anyone help with getting all this data at once? or even something i can run on each server to output this data?
AlirithAsked:
Who is Participating?
 
mark1208Connect With a Mentor Commented:
Hi Alirith,

Something like the VBScript here should do the trick, and then some!
http://gallery.technet.microsoft.com/ScriptCenter/en-us/cddf9aef-839f-4405-8637-1c2d74522fd6

You might also take a look at Print Migrator 3.1 (replaced with PrintBrm in WS2008): http://www.microsoft.com/windowsserver2003/techinfo/overview/printmigrator3.1.mspx. Or, try using the Print Management snap-in
(http://support.microsoft.com/kb/938923)  from a Vista, Win7, or WS2008 client to remotely enumerate printers from a list of WS2003 servers.

Hope this helps (or at least gets you started)!
-Mark
0
 
Joseph DalyCommented:
Are these printers shared through active directory? If so you should have a listing of them by doing find, and selecting the printers drop down.

Otherwise you can use the WMI query to return results. Save the code below as a VBS. As long as you have admin rights on the print server it should work for you.
strComputer = "printservername" 
strDomain = "domain.com" 
Wscript.StdOut.Write "Please enter your user name:"
strUser = Wscript.StdIn.ReadLine 
Set objPassword = CreateObject("ScriptPW.Password")
Wscript.StdOut.Write "Please enter your password:"
strPassword = objPassword.GetPassword()
Wscript.Echo

Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") 
Set objWMIService = objSWbemLocator.ConnectServer(strComputer, _ 
    "root\CIMV2", _ 
    strUser, _ 
    strPassword, _ 
    "MS_409", _ 
    "ntlmdomain:" + strDomain) 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_Printer",,48) 
For Each objItem in colItems 
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "Win32_Printer instance"
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "Location: " & objItem.Location
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "PortName: " & objItem.PortName
    Wscript.Echo "ShareName: " & objItem.ShareName
Next

Open in new window

0
 
Joseph DalyCommented:
And actually an even easier way of doing this using the command line WMIC.


wmic /node:{printservername} printer get name, location, portname

Since this is just a windows command you can just pipe the output to a file >c:\output.txt
0
 
AlirithAuthor Commented:
Print manangement snap in was just what i needed!
even allows for future central management which will make life easier
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.