Quantcast
Channel: List printers from command line to text file - Super User
Viewing all articles
Browse latest Browse all 9

Answer by Wesley for List printers from command line to text file

$
0
0

In Windows XP use prntmngr:

PRNMNGR -l >> C:\printers.txt

In Windows XP SP3 Vista and beyond (you need to install powershell v1 manually) , use PowerShell:

get-WmiObject -class Win32_printer | ft name, systemName, shareName >> c:\printers.txt

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:

cscript prnmngr.vbs -l >> c:\printers.txt

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.


Viewing all articles
Browse latest Browse all 9

Trending Articles