Score:0

Powershell: print directly setting

us flag

I'm trying to set the printer settings to "Print directly to the printer" through Powershell. This because it tends to change back from time to time.

I've managed to do this 2 days ago but when I wanted to run it today it didn't work.

This was my test code:

$printer = "Brother MFC-J4510DW Printer"
$pr = Get-WmiObject -Class Win32_Printer -Filter "Name = '$printer'"
$pr.Direct = $true
$pr.Put()

This should make property SpoolEnabled go to $false but it doesn't and property Direct just reverses back to $false.

Tried it with

rundll32 printui.dll,PrintUIEntry /Xs /n "YOUR PRINTER" attributes +direct"

and Set-WmiInstance as well but same results.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.