From 7a1feec74eb0ad2c4bafd1d79824855ce416c7e1 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 12 Jun 2024 11:10:05 -0400 Subject: [PATCH] Enable duplexer for Classroom HP Printer --- printers.sls | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/printers.sls b/printers.sls index 3f8f968..f2597a9 100644 --- a/printers.sls +++ b/printers.sls @@ -26,6 +26,11 @@ - shell: powershell - unless: Get-Printer -Name '{{ printer | replace('_', ' ') }}' {% endfor %} + + +# enable duplexer for Classroom HP +"Set-PrinterProperty -PrinterName 'ClassroomColor HP' -PropertyName Config:DuplexUnit -Value Installed": cmd.run: - shell: powershell - - unless: Get-Printer -Name ClassroomColor + - unless: + - if ($(Get-PrinterProperty -PrinterName "ClassroomColor HP" -PropertyName Config:DuplexUnit).value -eq "Installed") { exit 0 } else { exit 1 }