Setting default printer remotely

Welcome Forums General PowerShell Q&A Setting default printer remotely

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
1 year, 11 months ago.

  • Author
    Posts
  • #65322

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Can you show the code you're running?

The topic ‘Setting default printer remotely’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort