none
getting the default printer from remote computer RRS feed

  • Question

  • Hey,

    is there a way to get the default printer from remote computer using powershell ?

    if I try using gwmi -class win32_printer -computername <xxxx> i'll get " default : false " on all the printers.

    but if I run gwmi -class win32_printer -computername localhost in the local powershell console when I'm connect using rdp I will get the " default : true " on one of the installed printers.

    why is that ??

    thanks in advance.

    Saturday, July 25, 2015 6:54 PM

Answers

  • There is no such thing. Only a user account can declare a default printer. You cannot use WMI to get a users printer settings. Every user can have a different set of printers and default.


    \_(ツ)_/

    • Proposed as answer by Wizend Monday, July 27, 2015 5:23 PM
    • Marked as answer by Bill_StewartModerator Wednesday, October 14, 2015 12:08 AM
    Saturday, July 25, 2015 7:27 PM

All replies

  • There is no such thing. Only a user account can declare a default printer. You cannot use WMI to get a users printer settings. Every user can have a different set of printers and default.


    \_(ツ)_/

    • Proposed as answer by Wizend Monday, July 27, 2015 5:23 PM
    • Marked as answer by Bill_StewartModerator Wednesday, October 14, 2015 12:08 AM
    Saturday, July 25, 2015 7:27 PM
  • Even if WMI fails, perhaps this proposal of using the registry in your PowerShell script to get a list of default printers from users on remote machines will bring you forward.

    wizend
    Monday, July 27, 2015 5:34 PM