Update samy.ps1
This commit is contained in:
5
samy.ps1
5
samy.ps1
@@ -1846,6 +1846,7 @@ function Invoke-InstallPrinters {
|
|||||||
$clientCode = $p.ClientCode
|
$clientCode = $p.ClientCode
|
||||||
$profileName = $p.ProfileName
|
$profileName = $p.ProfileName
|
||||||
$setDefault = $false
|
$setDefault = $false
|
||||||
|
|
||||||
if ($p.PSObject.Properties.Name -contains 'SetAsDefault' -and $p.SetAsDefault) {
|
if ($p.PSObject.Properties.Name -contains 'SetAsDefault' -and $p.SetAsDefault) {
|
||||||
$setDefault = $true
|
$setDefault = $true
|
||||||
}
|
}
|
||||||
@@ -1857,11 +1858,11 @@ function Invoke-InstallPrinters {
|
|||||||
continue
|
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
|
Write-LogHybrid "WHATIF: Installing printer ($summary)" Info Printers -LogToEvent
|
||||||
|
|
||||||
try {
|
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 `
|
Invoke-SamyPrinterInstall `
|
||||||
-ClientCode $clientCode `
|
-ClientCode $clientCode `
|
||||||
-ProfileName $profileName `
|
-ProfileName $profileName `
|
||||||
|
|||||||
Reference in New Issue
Block a user