Setting default printer remotely

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 1 year, 4 months ago.

  • Author
  • #65322

    Andrew Herbert

    I'm attempting to use PowerShell to set a default printer in Windows 2012 R2. This works fine every time whenever I do it locally, however regardless of how I attempt to run it remotely, which I need to do, it always fails with the below error. I've tried this with the Domain Administrator account as well as the user's credentials who I need to change the default printer for, but it always fails with the following error:

    Exception calling "SetDefaultPrinter" : "Not supported "
    At line:1 char:1
    + $Printer.SetDefaultPrinter()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WMIMethodException

    Working code when run locally

  • #65389

    Don Jones

    Can you show the code you're running?

You must be logged in to reply to this topic.