Windows 10: scripting printer setup

Discus and support scripting printer setup in Windows 10 Customization to solve the problem; I am trying to use powershell to set the default papersize on student laptops, because it is time-consuming to go through the GUI on so many computers.... Discussion in 'Windows 10 Customization' started by Peter Mitchell YPM, Feb 25, 2020.

  1. scripting printer setup


    I am trying to use powershell to set the default papersize on student laptops, because it is time-consuming to go through the GUI on so many computers.

    The standard command would be

    Set-PrintConfiguration -PrinterName "School printer" -PaperSize A4


    This appears to run with no error, but no change to the printing preferences is visible, even after restarting the computer.


    As a test I tried

    Set-PrintConfiguration -PrinterName "School printer" -Color $False

    and this changed the output of Get-PrintConfiguration, but still did not change the printing preference settings.

    Student devices typically run Windows 10 Home. I have tried it on a computer with Windows 10 Enterprise and it works.


    Ideas, anyone?

    :)
     
    Peter Mitchell YPM, Feb 25, 2020
    #1

  2. Setting Default Printer via Startup Script

    This looks like a good solution, and similar to some of the VB scripts I tried.. but it is a logon script. I would need something that works as a startup script. We are not mapping printers to users as they move around too much, but rather mapping to each computer.

    The Link that W1ZZARD posted is good information. Sadly however, I have tried utilizing most of the commands that are available. The /c command is indeed interesting, but we are trying to map them when a computer starts up (prior to logon screen) versus just mapping them remotely. The purpose would be if we had a lab that needed the default printer changed, sure we could just send the remote command to each machine, or even remote into them ourselves and manually do it, but I was looking for a smoother alternative.

    It seems like its just something that will have to be done manually and with user education.

    Thanks for all the suggestions though.
     
    Wastedslayer, Feb 25, 2020
    #2
  3. RCoon Win User
    Setting Default Printer via Startup Script

    I do it with VB logon scripts


    "Dim ps0 [<------ our printer server the printers are added/managed on]
    Dim printer

    ps0 = "\\ps0\"
    printer = "S14 - Oki ES4140" [<------- the name of the printer as it is shown on the server]

    Set wshNetwork = CreateObject("WScript.Network")
    on Error Resume Next

    'Deletes all network printers
    Set clPrinters = wshNetwork.EnumPrinterConnections
    On Error Resume Next
    For i = 0 to clPrinters.Count - 1 Step 2
    wshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true
    Next

    'Add Network printer
    wshNetwork.AddWindowsPrinterConnection ps0 & printer

    'Set Default Printer
    wshNetwork.SetDefaultPrinter ps0 & printer" [<------ this bit sets it as default (note: this must be applied as the first policy before any other printers policies, otherwise it deletes them)]


    scripting printer setup Printerscrupt.png
     
    RCoon, Feb 25, 2020
    #3
  4. scripting printer setup

    Setting Default Printer via Startup Script

    I'm ready to admit defeat on this one. I recently took over a school network and have been working to migrate them away from a 3rd party application known as Desktop Authority. It's basically an alternative to Group Policy from what I have gathered.

    Part of this process involves re-configuring the way that our Printers are deployed, and which one is the default. Here is where it gets tricky, I can't select a printer for a USER, I need the printer to be set for the COMPUTER (Kids and teachers move around). Simple enough, configure Deployed Printers in the GPO and go on our merry way. The problem comes when a teacher, or a classroom needs to have their default printer changed. These machines are "Frozen" with Faronics DeepFreeze and so any changes made would revert upon a restart. Sure, we could go to each machine and re-configure the default printer... but with 3200 computers that will take some time.

    Ideally I would like to use a STARTUP script to map the default printer. However, I've tried just about everything on the web with no success. VB Scripts, BAT Files, etc. WMIC Printer Where name... Rundll32... and nothing. The default printer stays the same. I've verified the scripts are running, and when run manually they work fine. I feel like during the boot process it's to soon to select the printer. Permissions and everything are fine as well.

    Either way, I'm hoping that someone has some experience with something similar or at least a type of workaround.

    Thanks for any help!
     
    Wastedslayer, Feb 25, 2020
    #4
Thema:

scripting printer setup

Loading...
  1. scripting printer setup - Similar Threads - scripting printer setup

  2. Proxy setup script not saving

    in Windows 10 Gaming
    Proxy setup script not saving: Proxy setup script not saving even after updating group policy sccessfully. https://answers.microsoft.com/en-us/windows/forum/all/proxy-setup-script-not-saving/7ddc9264-0986-41ea-9010-8ec52d67c4d1
  3. Proxy setup script not saving

    in Windows 10 Software and Apps
    Proxy setup script not saving: Proxy setup script not saving even after updating group policy sccessfully. https://answers.microsoft.com/en-us/windows/forum/all/proxy-setup-script-not-saving/7ddc9264-0986-41ea-9010-8ec52d67c4d1
  4. Proxy setup script not saving

    in Windows 10 Network and Sharing
    Proxy setup script not saving: Proxy setup script not saving even after updating group policy sccessfully. https://answers.microsoft.com/en-us/windows/forum/all/proxy-setup-script-not-saving/7ddc9264-0986-41ea-9010-8ec52d67c4d1
  5. Printer setup

    in Windows 10 Drivers and Hardware
    Printer setup: Cannot setup my printer now that I am using windows 10 ARM on my apple with an m1 chip https://answers.microsoft.com/en-us/windows/forum/all/printer-setup/33cc1857-f993-423a-b848-20dc6f4968b2
  6. Printer setup help

    in Windows 10 Drivers and Hardware
    Printer setup help: I need to setup my printer preferences to print my checks in reverse order. How do I go about doing that? https://answers.microsoft.com/en-us/windows/forum/all/printer-setup-help/e26079ce-312f-4047-8ae8-8be15693eac8
  7. runtime error in setup script

    in Windows 10 Installation and Upgrade
    runtime error in setup script: im installing some application, and this error accuired[ATTACH] https://answers.microsoft.com/en-us/windows/forum/all/runtime-error-in-setup-script/d68ab0fd-fa5d-4bdb-b6d1-29ba8c479050
  8. problems with printer setup

    in Windows 10 Drivers and Hardware
    problems with printer setup: After updating windows 10, my HP printer refuses to print from my PC. I have tried all recommended troubleshooting, but still get the message unable to print due to" problem with printer setup". The copier works on its own and the HP troubleshooter failed to find anything to...
  9. Printer Setup

    in Windows 10 Drivers and Hardware
    Printer Setup: Need assistance setting up Brother printer to work with Windows 10 on my computer. https://answers.microsoft.com/en-us/windows/forum/all/printer-setup/8443c6a6-79ca-4eae-9b78-db8acf9f7760
  10. printers setup

    in Windows 10 Drivers and Hardware
    printers setup: i'm not install my hp lejer jet 1020 plus printer setup https://answers.microsoft.com/en-us/windows/forum/all/printers-setup/43c01617-d703-48de-90a9-9867ade25b9c