Update samy.ps1
This commit is contained in:
5
samy.ps1
5
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 `
|
||||
|
||||
Reference in New Issue
Block a user