2

I am seeking assistance regarding a PowerShell command to enable specific features under the "Advance" tab in printer properties. Specifically, I am interested in enabling the "Start printing after last page is spooled" and "Print spooled document first" options. The printer I am working with is named "TestPrinter."

If anyone has experience or knowledge in this area, I would greatly appreciate your guidance. Thank you in advance for any help you can provide.

Feature highlighted on this image for your reference

I'm unable to find codes to enable theses specific features.

3
  • 1
    You need to connect to the print driver : woshub.com/… Commented Sep 23, 2023 at 9:23
  • You can set it on a windows server, then share the printer through group policy. Commented Sep 24, 2023 at 14:07
  • This question is about indeed setting those "specific" settings, but programmatically via PowerShell. Everyone knows you can set those other ways then have those set as the default, on the client if shared too, but what about 'setting those settings via what was requested method wise' is the question from my interpretation—that's pretty easy to understand what's being requested specifically. Why might this scenario be important, hundreds or thousands of defined printers across multiple systems for example. Commented Sep 24, 2023 at 14:17

1 Answer 1

0

This solution works based on the printer's initial starting configuration and those specific settings being set to match as your desired result. This uses Win32_Printer class to set the bool values accordingly.

$printer = "TestPrinter";
Get-WmiObject -Class Win32_Printer | Where-Object {$_.Name -eq $printer} | ForEach-Object {
    $_.DoCompleteFirst = $True
    $_.Direct = $False
    $_.Put() | Out-Null
    };

It's worth noting that I cannot quite figure out how to toggle the specific option "Start printing immediately" though unless the initial starting configuration is set as "Print directly to the printer".

So if your starting configuration is set as "Start printing after last page is spooled" then this is only a partial answer as it does not toggle it with that set initially.

Notes

  1. A workaround of setting the print processor to a value winprint might help per those being its defaults but I couldn't safely test that in my environment.
  2. The SpoolEnabled is not changeable any longer if it's even applicable in that specific configuration.

Supporting Resources

Sign up to request clarification or add additional context in comments.

3 Comments

@Thaju89 so this may be just a partial (50%) method depending on your specific starting printer configuration. Perhaps it'll give other experts an idea to dig deeper to show us both how to also toggle that other option regardless of starting configuration but that's what I have for you regardless so hopefully it'll help you a bit with your task/inquiry.
I posted Printing Defaults question on SU recently and did not get any help except advice that "it is in the driver" which was not helpful at all for my task then, but I figured it out on my own for that inquiry here, so I'm assuming this is not a well understand topic for folks on these communities or the experts haven't dug enough or seen our questions to help otherwise: superuser.com/questions/1806776/…. In my case, print server transitions with different drivers on new server.
it worked thanks and I was able to achive both setting by the below mentioned $printer = "TestPrinter"; Get-WmiObject -Class Win32_Printer | Where-Object {$_.Name -eq $printer} | ForEach-Object { $_.DoCompleteFirst = $True $_.Queued = $true $_.Put() | Out-Null };

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.