From 6d1ef7a36be8389ce1191f7210162469736a3183 Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Fri, 5 Dec 2025 14:24:11 -0500 Subject: [PATCH] Update samy.ps1 --- samy.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samy.ps1 b/samy.ps1 index e8dd834..0c1389c 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -1846,6 +1846,7 @@ function Invoke-InstallPrinters { $clientCode = $p.ClientCode $profileName = $p.ProfileName $setDefault = $false + if ($p.PSObject.Properties.Name -contains 'SetAsDefault' -and $p.SetAsDefault) { $setDefault = $true } @@ -1857,11 +1858,11 @@ function Invoke-InstallPrinters { continue } - $summary = "ClientCode=$clientCode ProfileName=$profileName SetAsDefault=$setDefault" + $summary = "ClientCode=$clientCode ProfileName=$profileName DisplayName=$($p.DisplayName) Location=$($p.Location) SetAsDefault=$setDefault" Write-LogHybrid "WHATIF: Installing printer ($summary)" Info Printers -LogToEvent try { - # 🔐 SAFE PHASE: we call with -WhatIf so no real change happens + # SAFE PHASE: we call with -WhatIf so no real change happens Invoke-SamyPrinterInstall ` -ClientCode $clientCode ` -ProfileName $profileName `