Display Printers via command line

Is there an easy way to view all printers on a local
machine via command line or a script?

I'm looking for the equivalent of clicking on
"START, CONTROL PANEL, PRINTERS AND FAXES"
to view the devices.

I then want to cat it to a file where I would use
it later.

Thanks

You didn't mention the platform, I guess its Windows XP, for windows XP/NT, try this at command prompt:

c:\>cscript %systemroot%\system32\prndrvr.vbs -x

Above'll delete all unused drivers, then enter following commands, to get the desired results:

c:\>cscript %systemroot%\system32\prndrvr.vbs -l > tmp

c:\>find "Driver name" tmp > yourfile

Regards,
Tayyab

Thank you, Thank you, Thank You!!!

Is there a way to capture the printers name as well?

What you mean by printer name? Above command is already giving you printer names only. I ran above batch and got following ouput:

---------- TMP
Driver name HP OfficeJet G95,3,Windows NT x86
Driver name HP OfficeJet G85,3,Windows NT x86
Driver name hp LaserJet 1160 PCL 5e,3,Windows NT x86
Driver name hp deskjet 940c,3,Windows NT x86
Driver name Hewlett-Packard HP-GL/2 Plotter,3,Windows NT x86
Driver name Epson LQ-680 ESC/P 2,3,Windows NT x86

Here, Driver name means printer name. Like HP OfficeJet G95 etc.

Pls explain exactly what you want.

Regards,
Tayyab