# Powershell & Printers

**URL:** <https://forums.powershell.org/t/powershell-printers/13844>\
**Category:** PowerShell Help\
**Created:** [February 20, 2020, 2:31pm UTC](https://forums.powershell.org/t/powershell-printers/13844 "2020-02-20T14:31:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![janothin](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@janothin](https://forums.powershell.org/u/janothin)\
**Post date:** [February 20, 2020, 2:31pm UTC](https://forums.powershell.org/t/powershell-printers/13844/1 "2020-02-20T14:31:25Z")

</div>

Hi all, I’m in a desparate situation and have been trying to figure this out for quite some time.

&nbsp;

I need the ability to add printer trays to printers being added through powershell. I also need the ability to set duplexing. There is device settings per each printer, but I don’t know how to set the tray 3 as ‘installed’ and as duplex as ‘installed’.

&nbsp;

Any advice?

---

<div class="post-metadata">

**Author:** ![bo1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/bo1/32/33_2.png) [@bo1](https://forums.powershell.org/u/bo1)\
**Post date:** [February 20, 2020, 5:35pm UTC](https://forums.powershell.org/t/powershell-printers/13844/2 "2020-02-20T17:35:18Z")

</div>

Use the PrintManagement Module.

Tray Settings:

Get-PrinterProperty

Set-PrinterProperty

Duplexing:

Get-PrintConfiguration

Set-PrintConfiguration

&nbsp;

---

<div class="post-metadata">

**Author:** ![janothin](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@janothin](https://forums.powershell.org/u/janothin)\
**Post date:** [February 20, 2020, 6:48pm UTC](https://forums.powershell.org/t/powershell-printers/13844/3 "2020-02-20T18:48:09Z")

</div>

I’ve reviewed Microsoft’s documentation on this, and have been unsuccessful. Can you provide an example of each command if that’s not asking for too much?

---

<div class="post-metadata">

**Author:** ![bo1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/bo1/32/33_2.png) [@bo1](https://forums.powershell.org/u/bo1)\
**Post date:** [February 21, 2020, 1:48pm UTC](https://forums.powershell.org/t/powershell-printers/13844/4 "2020-02-21T13:48:40Z")

</div>

Duplexing Example

`
$Server = ‘PrintServer’
$Printer = ‘Printer123’
Get-PrintConfiguration -ComputerName $Server -PrinterName $Printer
Set-PrintConfiguration -ComputerName $Server -PrinterName $Printer -DuplexingMode TwoSidedLongEdge 
`

---

<div class="post-metadata">

**Author:** ![bo1](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/bo1/32/33_2.png) [@bo1](https://forums.powershell.org/u/bo1)\
**Post date:** [February 21, 2020, 1:54pm UTC](https://forums.powershell.org/t/powershell-printers/13844/5 "2020-02-21T13:54:12Z")

</div>

Print Tray Example

`
$Server = ‘PrintServer’
$Printer = ‘Printer123’
Get-PrinterProperty -ComputerName $Server -PrinterName $Printer | Where-Object PropertyName -Match ‘tray\d_install’
Set-PrinterProperty -ComputerName $Server -PrinterName $Printer -PropertyName Config:Tray4_install -Value “INSTALLED” 
`

---

<div class="post-metadata">

**Author:** ![drumsand](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/drumsand/32/116_2.png) [@drumsand](https://forums.powershell.org/u/drumsand)\
**Post date:** [April 3, 2020, 12:06pm UTC](https://forums.powershell.org/t/powershell-printers/13844/6 "2020-04-03T12:06:18Z")

</div>

Hi Guys,

I need to ask about expanding such query. I need to check and possibly set -PaperSize for trays in printer.

```auto
$Printer = "my_printer"
Get-PrinterProperty -printername $printer | where {$_.PropertyName -like "*config:tray*"} | ft -AutoSize

```

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [April 7, 2020, 8:15pm UTC](https://forums.powershell.org/t/powershell-printers/13844/7 "2020-04-07T20:15:34Z")

</div>

Hi DrumSand,

&nbsp;

Check and set to what?

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/powershell-printers/13844/8 "2024-05-16T20:29:56Z")

</div>

Closed on May 16, 2024, 8:29pm UTC


