Jump to content

Recommended Posts

Guest Richard
Posted

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!

  • Replies 4
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

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

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

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

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

>>

>>

>>

>

>


×
×
  • Create New...