Guest Richard Posted January 7, 2008 Posted January 7, 2008 Does anyone know of a tool or command that will list all printers on a server. We have a Windows Server 2003 print server with 300+ printers that I would like to list the printer name, ip address (port), and location info. Any information is greatly appreciated. Thanks!
Guest Pegasus \(MVP\) Posted January 7, 2008 Posted January 7, 2008 Re: Printer list "Richard" <rdumag@hotmail.com> wrote in message news:evHlV2XUIHA.4740@TK2MSFTNGP02.phx.gbl... > Does anyone know of a tool or command that will list all printers on a > server. We have a Windows Server 2003 print server with 300+ printers > that I would like to list the printer name, ip address (port), and > location info. > > Any information is greatly appreciated. Thanks! > You could tailor the script below to your specific needs: Set oMaster = CreateObject("PrintMaster.PrintMaster.1") For Each oPrinter In oMaster.Printers("\\YourServer") WScript.Echo "Loc =" & oPrinter.Comment WScript.echo "Name=" & oPrinter.PrinterName WScript.Echo "Port=" & oPrinter.PortName WScript.echo Next It is based on the file prnadmin.doc and it requires prnadmin.dll, both of which are included in the Windows Server 2003 Resource Kit.
Guest Pegasus \(MVP\) Posted January 7, 2008 Posted January 7, 2008 Re: Printer list "Richard" <rdumag@hotmail.com> wrote in message news:evHlV2XUIHA.4740@TK2MSFTNGP02.phx.gbl... > Does anyone know of a tool or command that will list all printers on a > server. We have a Windows Server 2003 print server with 300+ printers > that I would like to list the printer name, ip address (port), and > location info. > > Any information is greatly appreciated. Thanks! If you run the script on the server itself then you should modify it like so: Set oMaster = CreateObject("PrintMaster.PrintMaster.1") For Each oPrinter In oMaster.Printers("") WScript.Echo "Loc =" & oPrinter.Comment WScript.echo "Name=" & oPrinter.PrinterName WScript.Echo "Port=" & oPrinter.PortName WScript.echo Next
Guest Richard Posted January 8, 2008 Posted January 8, 2008 Re: Printer list Thank you for the quick response Pegasus. I have couple of questions. 1) do I save it as .vbs 2) will it generate a txt file i can import to excel. Thank you! "Pegasus (MVP)" <I.can@fly.com.oz> wrote in message news:e6iLLgYUIHA.1204@TK2MSFTNGP03.phx.gbl... > > "Richard" <rdumag@hotmail.com> wrote in message > news:evHlV2XUIHA.4740@TK2MSFTNGP02.phx.gbl... >> Does anyone know of a tool or command that will list all printers on a >> server. We have a Windows Server 2003 print server with 300+ printers >> that I would like to list the printer name, ip address (port), and >> location info. >> >> Any information is greatly appreciated. Thanks! > > If you run the script on the server itself then you should > modify it like so: > > Set oMaster = CreateObject("PrintMaster.PrintMaster.1") > For Each oPrinter In oMaster.Printers("") > WScript.Echo "Loc =" & oPrinter.Comment > WScript.echo "Name=" & oPrinter.PrinterName > WScript.Echo "Port=" & oPrinter.PortName > WScript.echo > Next > > >
Guest Pegasus \(MVP\) Posted January 8, 2008 Posted January 8, 2008 Re: Printer list Yes, you save it as a .vbs file. It generates text output to the screen from where you can redirect it to a text file of your choice. "Richard" <rdumag@hotmail.com> wrote in message news:u0mA3rYUIHA.5836@TK2MSFTNGP04.phx.gbl... > Thank you for the quick response Pegasus. > > I have couple of questions. 1) do I save it as .vbs 2) will it generate a > txt file i can import to excel. > > Thank you! > > > "Pegasus (MVP)" <I.can@fly.com.oz> wrote in message > news:e6iLLgYUIHA.1204@TK2MSFTNGP03.phx.gbl... >> >> "Richard" <rdumag@hotmail.com> wrote in message >> news:evHlV2XUIHA.4740@TK2MSFTNGP02.phx.gbl... >>> Does anyone know of a tool or command that will list all printers on a >>> server. We have a Windows Server 2003 print server with 300+ printers >>> that I would like to list the printer name, ip address (port), and >>> location info. >>> >>> Any information is greatly appreciated. Thanks! >> >> If you run the script on the server itself then you should >> modify it like so: >> >> Set oMaster = CreateObject("PrintMaster.PrintMaster.1") >> For Each oPrinter In oMaster.Printers("") >> WScript.Echo "Loc =" & oPrinter.Comment >> WScript.echo "Name=" & oPrinter.PrinterName >> WScript.Echo "Port=" & oPrinter.PortName >> WScript.echo >> Next >> >> >> > >
Recommended Posts