Is there a command that can be used from the command line to output a list of the printers installed and their location, if mapped, to a text file? Or perhaps a program that I can run from the command line that would do this?
Windows – List printers from command line to text file
command lineprinterwindows
Related Question
- Windows – Open file from the command line on Windows
- Windows Command Line – Redirect Output to Text File While Also Seeing Output
- Windows – Redirecting input from file to command-line program
- Windows – List files with path using Windows command line
- Windows – List Available Wireless Networks from Command Line
- Networking – Create a batch file to backup and restore network printers for all users
Best Answer
In Windows XP use prntmngr:
In Windows XP SP3 Vista and beyond (you need to install powershell v1 manually) , use PowerShell:
Note: You MAY get an error if you attempt to write the file to C:\ on Vista+, depending on your rights, and how PowerShell was spawned.
For Windows 2000:
The
PrnMngr.vbs
file from XP (located in the/Windows/System32
folder) does work on Windows 2000. Just find and copy it over to the 2000 machine from an XP machine and run it with:I found it wouldn't run from my user's desktop for some reason, but when I copied the .VBS to the root of C: it ran fine.