No announcement yet.

Printer managment

  • Filter
  • Time
  • Show
Clear All
new posts

  • Printer managment


    Im looking for a PS script that will batch change all printerqueus to what ever default setting I need

    In my case its almost allways to change to mono/duplex

    I found scripts to batch install printqueus from CSV and a script to change all to winpint processor....mono/duplex script is kind of last piece of the puzzle for me
    Would save lots of work

    Anyone here familiar with a script like that?

    (Most of my servers are still on 2008R)

    come to think of it , would it be possible with PS to chnage all queus that currently have one specific driver to another.
    Like, All queues with driver version1.2.3.4 chnage to

    ***this script seems to change to duplex, atlest if the printqueue is shared**
    So now it feels like I just miss how to set mono

    $host.Runspace.ThreadOptions = "ReuseThread"
    Add-Type -AssemblyName System.Printing
    $permissions = [System.Printing.PrintSystemDesiredAccess]::AdministrateServer
    $queueperms = [System.Printing.PrintSystemDesiredAccess]::AdministratePrinter
    $server = new-object System.Printing.PrintServer -argumentList $permissions
    $queues = $server.GetPrintQueues(@([System.Printing.EnumeratedPrintQueueTypes]::Shared))
    foreach ($q in $queues) { 
        #Get edit Permissions on the Queue
        $q2 = new-object System.Printing.PrintQueue -argumentList $server,$q.Name,1,$queueperms
        #Set DefaultPrintTicket
        $duplexCaps = $q2.GetPrintCapabilities().DuplexingCapability
        if ($duplexCaps.Contains([System.Printing.Duplexing]::TwoSidedLongEdge)) {
            $q2.DefaultPrintTicket.Duplexing = [System.Printing.Duplexing]::TwoSidedLongEdge
    Last edited by Dumber; 14th October 2014, 11:08. Reason: Code tags added

  • #2
    Re: Printer managment

    I'm impressed. This is really digging deep. It might be as simple as this:



    • #3
      Re: Printer managment

      If you have Windows 8 or later, see if Set-PrintConfiguration will do the trick.


      • #4
        Re: Printer managment


        I tried this part

        And I get a message that its ben set but when i open up the queue settings it still says autocolor. I havent tried to actually print anything since its a test enviroment with dummy queus.

        Feels weird that its possible to set dupelx/single pages with powershell but not the color part .

        I will try it on a. 2012 server and see what happens


        • #5
          Re: Printer managment

          I don't have the right network to test any of this.


          • #6
            Re: Printer managment

            Here is a fellow that made a nice script
            ( cant post the link but google "SetPrint.ps1: A Powershell Script to Set Some Default Settings on Print Queues")

            That script works all the way for me on 2012 servers

            setting duplex/onesided/ mono/color in a heartbeat

            On 2008 servers i can only get the duplex part working though


            • #7
              Re: Printer managment

              You meant this link MisterO?
              Technical Consultant

              MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
              "No matter how secure, there is always the human factor."

              "Enjoy life today, tomorrow may never come."
              "If you're going through hell, keep going. ~Winston Churchill"


              • #8
                Re: Printer managment


                yea thats the script

                But unfortunately I cant get it working fully in 2008 R2


                • #9
                  Re: Printer managment

                  Is the 2008 R2 box running Server core or full GUI? There might be some .NET differences. That's about the only other thing I can come up with.