Change the default settings of a print queueHow to flush output of print function?What's the simplest way to print a Java array?Word 2007 Application.ActivePrinter does not get set when default printer is a network printerHow to print to stderr in Python?Printing to non default printer from c#Accessing/Restoring Network Printer PreferencesPrint RAW data to network shared printer fails from IIS server, but works properly in development envHow to print landscape PDF in portraitUse Powershell to set Print Spooled Documents FirstHow to use Ghostscript mswinpr2 to create postscript using print driver's settings

How to stabilise the bicycle seatpost and saddle when it is all the way up?

Do all humans have an identical nucleotide sequence for certain proteins, e.g haemoglobin?

The Planck constant for mathematicians

What jurisdiction do Scottish courts have over the Westminster parliament?

Seized engine due to being run without oil

Why did it become so much more expensive to start a university?

I asked for a graduate student position from a professor. He replied "welcome". What does that mean?

Can I conceal an antihero's insanity - and should I?

How seriously should I take a CBP interview where I was told I have a red flag and could only stay for 30 days?

Why is the Digital 0 not 0V in computer systems?

Should I leave the first authorship of our paper to the student who did the project whereas I solved it?

What is this unknown executable on my boot volume? Is it Malicious?

Telling my mother that I have anorexia without panicking her

Mean π: Archimedes vs. Gauss - π computation through generalized means

In Germany, how can I maximize the impact of my charitable donations?

Which ping implementation is Cygwin using?

Do Milankovitch Cycles fully explain climate change?

When was the earliest opportunity the Voyager crew had to return to the Alpha quadrant?

Will replacing a fake visa with a different fake visa cause me problems when applying for a legal study permit?

Why do sellers care about down payments?

"Literally" Vs "In the true sense of the word"

Is there an inconsistency about Natasha Romanoff's middle name in the MCU?

Why should I always enable compiler warnings?

Selecting 2 column in an Inner join



Change the default settings of a print queue


How to flush output of print function?What's the simplest way to print a Java array?Word 2007 Application.ActivePrinter does not get set when default printer is a network printerHow to print to stderr in Python?Printing to non default printer from c#Accessing/Restoring Network Printer PreferencesPrint RAW data to network shared printer fails from IIS server, but works properly in development envHow to print landscape PDF in portraitUse Powershell to set Print Spooled Documents FirstHow to use Ghostscript mswinpr2 to create postscript using print driver's settings






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















We're creating a script that collects user input from an Excel file. Each row represents one printer with its specific settings. So for each row we need to create a print queue on the print server.



We're struggling with setting the default settings for the printer So that when a user on the network adds the printer to his/her system, the settings are taken over from the queue on the print server.



Example with PageOrientation



On the print queue on the server we select Properties > Preferences > Basic where we set PageOrientation = Landscape. These settings are used when a user installs the network printer on his/her system:



Default printing preferences



Within PowerShell we tried to request the value for PageOrientation and expect to find Landscape but always get Portrait.



Some code:



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())
$Printer = $queues.Where( $_.Name -eq $testPrinter.PrinterName)

# Results all in 'Portrait' not 'Landscape'
$Printer.CurrentJobSettings.CurrentPrintTicket.PageOrientation
$Printer.DefaultPrintTicket.PageOrientation
$Printer.PropertiesCollection.UserPrintTicket.value.PageOrientation
$Printer.PropertiesCollection.DefaultPrintTicket.value.PageOrientation
$Printer.UserPrintTicket.PageOrientation


Trying to use Set-PrintConfiguration for changing the default tray does reflect a change when checked with Get-PrinterConfiguration, but it's not visible in the GUI and also not applied as a default when a user adds the network printer.



$PrintConfiguration = Get-PrintConfiguration -PrinterName $PrinterName
$PrintTicketXML = [XML]$PrintConfiguration.PrintTicketXML
$CurrentTray = ($PrintTicketXML.PrintTicket.Feature).where( $_.name -eq 'psk:JobInputBin').option.name
$NewTray = if ($Tray -eq 'AutoSelect') "psk:$Tray" else "ns0000:$Tray"
$UpdatedPrintTicketXML = $PrintConfiguration.PrintTicketXML -Replace "$CurrentTray", "$NewTray"
Set-PrintConfiguration -PrinterName $PrinterName -PrintTicketXml $UpdatedPrintTicketXML


Where can we find these default properties like Default tray, Paper type, ... and most importantly set their values?










share|improve this question
























  • I couldn't work out a way to set these for Konica printers when I looked into it a few years back, their support didn't have any idea either. Watching this question to see if anyone else had any luck!

    – James C.
    Mar 28 at 9:30

















1















We're creating a script that collects user input from an Excel file. Each row represents one printer with its specific settings. So for each row we need to create a print queue on the print server.



We're struggling with setting the default settings for the printer So that when a user on the network adds the printer to his/her system, the settings are taken over from the queue on the print server.



Example with PageOrientation



On the print queue on the server we select Properties > Preferences > Basic where we set PageOrientation = Landscape. These settings are used when a user installs the network printer on his/her system:



Default printing preferences



Within PowerShell we tried to request the value for PageOrientation and expect to find Landscape but always get Portrait.



Some code:



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())
$Printer = $queues.Where( $_.Name -eq $testPrinter.PrinterName)

# Results all in 'Portrait' not 'Landscape'
$Printer.CurrentJobSettings.CurrentPrintTicket.PageOrientation
$Printer.DefaultPrintTicket.PageOrientation
$Printer.PropertiesCollection.UserPrintTicket.value.PageOrientation
$Printer.PropertiesCollection.DefaultPrintTicket.value.PageOrientation
$Printer.UserPrintTicket.PageOrientation


Trying to use Set-PrintConfiguration for changing the default tray does reflect a change when checked with Get-PrinterConfiguration, but it's not visible in the GUI and also not applied as a default when a user adds the network printer.



$PrintConfiguration = Get-PrintConfiguration -PrinterName $PrinterName
$PrintTicketXML = [XML]$PrintConfiguration.PrintTicketXML
$CurrentTray = ($PrintTicketXML.PrintTicket.Feature).where( $_.name -eq 'psk:JobInputBin').option.name
$NewTray = if ($Tray -eq 'AutoSelect') "psk:$Tray" else "ns0000:$Tray"
$UpdatedPrintTicketXML = $PrintConfiguration.PrintTicketXML -Replace "$CurrentTray", "$NewTray"
Set-PrintConfiguration -PrinterName $PrinterName -PrintTicketXml $UpdatedPrintTicketXML


Where can we find these default properties like Default tray, Paper type, ... and most importantly set their values?










share|improve this question
























  • I couldn't work out a way to set these for Konica printers when I looked into it a few years back, their support didn't have any idea either. Watching this question to see if anyone else had any luck!

    – James C.
    Mar 28 at 9:30













1












1








1


1






We're creating a script that collects user input from an Excel file. Each row represents one printer with its specific settings. So for each row we need to create a print queue on the print server.



We're struggling with setting the default settings for the printer So that when a user on the network adds the printer to his/her system, the settings are taken over from the queue on the print server.



Example with PageOrientation



On the print queue on the server we select Properties > Preferences > Basic where we set PageOrientation = Landscape. These settings are used when a user installs the network printer on his/her system:



Default printing preferences



Within PowerShell we tried to request the value for PageOrientation and expect to find Landscape but always get Portrait.



Some code:



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())
$Printer = $queues.Where( $_.Name -eq $testPrinter.PrinterName)

# Results all in 'Portrait' not 'Landscape'
$Printer.CurrentJobSettings.CurrentPrintTicket.PageOrientation
$Printer.DefaultPrintTicket.PageOrientation
$Printer.PropertiesCollection.UserPrintTicket.value.PageOrientation
$Printer.PropertiesCollection.DefaultPrintTicket.value.PageOrientation
$Printer.UserPrintTicket.PageOrientation


Trying to use Set-PrintConfiguration for changing the default tray does reflect a change when checked with Get-PrinterConfiguration, but it's not visible in the GUI and also not applied as a default when a user adds the network printer.



$PrintConfiguration = Get-PrintConfiguration -PrinterName $PrinterName
$PrintTicketXML = [XML]$PrintConfiguration.PrintTicketXML
$CurrentTray = ($PrintTicketXML.PrintTicket.Feature).where( $_.name -eq 'psk:JobInputBin').option.name
$NewTray = if ($Tray -eq 'AutoSelect') "psk:$Tray" else "ns0000:$Tray"
$UpdatedPrintTicketXML = $PrintConfiguration.PrintTicketXML -Replace "$CurrentTray", "$NewTray"
Set-PrintConfiguration -PrinterName $PrinterName -PrintTicketXml $UpdatedPrintTicketXML


Where can we find these default properties like Default tray, Paper type, ... and most importantly set their values?










share|improve this question














We're creating a script that collects user input from an Excel file. Each row represents one printer with its specific settings. So for each row we need to create a print queue on the print server.



We're struggling with setting the default settings for the printer So that when a user on the network adds the printer to his/her system, the settings are taken over from the queue on the print server.



Example with PageOrientation



On the print queue on the server we select Properties > Preferences > Basic where we set PageOrientation = Landscape. These settings are used when a user installs the network printer on his/her system:



Default printing preferences



Within PowerShell we tried to request the value for PageOrientation and expect to find Landscape but always get Portrait.



Some code:



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())
$Printer = $queues.Where( $_.Name -eq $testPrinter.PrinterName)

# Results all in 'Portrait' not 'Landscape'
$Printer.CurrentJobSettings.CurrentPrintTicket.PageOrientation
$Printer.DefaultPrintTicket.PageOrientation
$Printer.PropertiesCollection.UserPrintTicket.value.PageOrientation
$Printer.PropertiesCollection.DefaultPrintTicket.value.PageOrientation
$Printer.UserPrintTicket.PageOrientation


Trying to use Set-PrintConfiguration for changing the default tray does reflect a change when checked with Get-PrinterConfiguration, but it's not visible in the GUI and also not applied as a default when a user adds the network printer.



$PrintConfiguration = Get-PrintConfiguration -PrinterName $PrinterName
$PrintTicketXML = [XML]$PrintConfiguration.PrintTicketXML
$CurrentTray = ($PrintTicketXML.PrintTicket.Feature).where( $_.name -eq 'psk:JobInputBin').option.name
$NewTray = if ($Tray -eq 'AutoSelect') "psk:$Tray" else "ns0000:$Tray"
$UpdatedPrintTicketXML = $PrintConfiguration.PrintTicketXML -Replace "$CurrentTray", "$NewTray"
Set-PrintConfiguration -PrinterName $PrinterName -PrintTicketXml $UpdatedPrintTicketXML


Where can we find these default properties like Default tray, Paper type, ... and most importantly set their values?







.net powershell printing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 28 at 9:25









DarkLite1DarkLite1

4,80318 gold badges58 silver badges113 bronze badges




4,80318 gold badges58 silver badges113 bronze badges















  • I couldn't work out a way to set these for Konica printers when I looked into it a few years back, their support didn't have any idea either. Watching this question to see if anyone else had any luck!

    – James C.
    Mar 28 at 9:30

















  • I couldn't work out a way to set these for Konica printers when I looked into it a few years back, their support didn't have any idea either. Watching this question to see if anyone else had any luck!

    – James C.
    Mar 28 at 9:30
















I couldn't work out a way to set these for Konica printers when I looked into it a few years back, their support didn't have any idea either. Watching this question to see if anyone else had any luck!

– James C.
Mar 28 at 9:30





I couldn't work out a way to set these for Konica printers when I looked into it a few years back, their support didn't have any idea either. Watching this question to see if anyone else had any luck!

– James C.
Mar 28 at 9:30












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55394088%2fchange-the-default-settings-of-a-print-queue%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.




















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55394088%2fchange-the-default-settings-of-a-print-queue%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해