Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I use the following Powershell command to list all the printers my laptop has configured, it takes a few minutes for Windows to return the result. I have 3 printers configured, one is a virtual CutePDF printer, one is a Canon printer on my home network and the last is a Xerox printer on my work network.

I am currently using the following to list the printers

gwmi -class Win32_Printer -computer .

Are there faster ways to do this? What's causing the slow down, is it interrogating the network for print server?

share|improve this question
1  
I'm guessing it's trying to query the work printer and timing out eventually. On my computer that only has local and home network printers configured, the same command takes only 1-2 seconds. –  Indrek Nov 30 '12 at 11:15
    
That's my thought as well. I would think there would be some way to specify a timeout or have a little more control over the way you query for it. I guess I could go directly against the registry. –  Johnnie Nov 30 '12 at 18:47
1  
I found a PS function that wraps Get-WmiObject and allows you to specify the timeout: muscetta.com/2009/05/27/get-wmicustom. See if that fixes your problem. –  Indrek Nov 30 '12 at 20:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.