client/cascades: phase2-print-server.ps1 — 8 printers installed on CS-SERVER

Rewrote with verified IPs and confirmed drivers. All 8 printers created and
shared via GuruRMM 2026-05-20. Deferred: FrontDesk Epson (needs Epson
Universal driver), Health-206 Konica Minolta (needs KM PCL6 Universal driver).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 08:43:30 -07:00
parent ba8526eae7
commit dc29e2ff24

View File

@@ -1,123 +1,160 @@
#Requires -RunAsAdministrator # Phase 2.6 — CS-SERVER Print Server Setup
<# # Run on CS-SERVER via GuruRMM remote PowerShell
.SYNOPSIS # Last updated: 2026-05-20 (Howard) — rewritten with verified IPs and confirmed drivers
Phase 2.4: Set up print server on CS-SERVER. #
.DESCRIPTION # Drivers confirmed installed on CS-SERVER:
Creates TCP/IP printer ports for all managed printers. # Canon Generic Plus PCL6 (v3)
Drivers must be installed manually before uncommenting the Add-Printer lines. # Brother Generic Jpeg Type2 Class Driver (v4)
Run on CS-SERVER via ScreenConnect. #
.NOTES # Deferred — need vendor driver downloaded to server first:
Download drivers from manufacturer websites FIRST: # Front Desk Epson ET-5800 (192.168.2.147) — Epson Universal Print Driver
- Epson ET-5800: https://epson.com/Support/Printers/All-In-Ones/ET-Series/Epson-ET-5800/s/SPT_C11CJ30201 # Health Svcs Konica Minolta Bizhub C368 (192.168.1.138) — Konica Minolta PCL6 Universal
- Canon MF455DW: https://www.usa.canon.com/support/p/imageclass-mf455dw
- Canon MF451CDW: https://www.usa.canon.com/support/p/imageclass-mf451dw
- Brother MFC-L8900CDW: https://www.brother-usa.com/support/mfcl8900cdw
- Konica Minolta Bizhub C368: https://www.konicaminolta.us/en-us/support/download-centre
Install drivers on CS-SERVER, then uncomment the Add-Printer section below.
#>
Write-Host "=== Phase 2.4: Print Server Setup ===" -ForegroundColor Cyan $ErrorActionPreference = 'Continue'
Write-Host ""
# --- Ensure Print Server feature is installed --- # Verify Print Server role is installed
Write-Host "--- Checking Print Server role ---" -ForegroundColor Yellow $role = Get-WindowsFeature -Name Print-Server -ErrorAction SilentlyContinue
$printFeature = Get-WindowsFeature -Name Print-Server -ErrorAction SilentlyContinue if ($role -and -not $role.Installed) {
if ($printFeature -and -not $printFeature.Installed) {
Install-WindowsFeature -Name Print-Server -IncludeManagementTools Install-WindowsFeature -Name Print-Server -IncludeManagementTools
Write-Host " [OK] Print Server role installed" -ForegroundColor Green Write-Output '[OK] Print Server role installed'
} else { } else {
Write-Host " [OK] Print Server role already installed" -ForegroundColor Green Write-Output '[--] Print Server role already present'
} }
# --- Define printers ---
$printers = @( $printers = @(
@{ Name = "Front Desk - Epson ET-5800"; IP = "192.168.2.147"; ShareName = "FrontDesk-Epson"; Driver = "EPSON ET-5800 Series" } # Everyone gets this one — set as default via GPO
@{ Name = "Business Office - Canon MF455DW"; IP = "192.168.3.227"; ShareName = "BizOffice-Canon"; Driver = "Canon Generic Plus UFR II" } @{
@{ Name = "Marketing - Brother MFC-L8900CDW"; IP = "192.168.2.21"; ShareName = "Marketing-Brother"; Driver = "Brother MFC-L8900CDW series" } IP = '192.168.2.230'
@{ Name = "206 Health - Bizhub C368"; IP = "192.168.1.138"; ShareName = "Health206-Bizhub"; Driver = "KONICA MINOLTA Universal PCL" } Port = 'TCP_192.168.2.230'
@{ Name = "206 Nurse Station - Brother MFC-L8900CDW"; IP = "10.0.20.69"; ShareName = "Health206-Brother"; Driver = "Brother MFC-L8900CDW series" } Name = 'Copy Room Canon'
@{ Name = "MemCare MedTech - Brother (model TBD)"; IP = "192.168.2.53"; ShareName = "MemCare-Brother"; Driver = "TBD" } Driver = 'Canon Generic Plus PCL6'
@{ Name = "MemCare Director - Canon MF451CDW"; IP = "192.168.3.52"; ShareName = "MemDir-Canon"; Driver = "Canon Generic Plus UFR II" } Share = 'CopyRoom'
@{ Name = "Kitchen Printer"; IP = "192.168.0.121"; ShareName = "Kitchen"; Driver = "TBD" } Location = 'Copy Room (1st Floor)'
Comment = 'Canon imageRunner C478iF - All staff'
}
# Administrative / BOD
@{
IP = '10.0.20.220'
Port = 'TCP_10.0.20.220'
Name = 'BOD Brother'
Driver = 'Brother Generic Jpeg Type2 Class Driver'
Share = 'BOD-Brother'
Location = 'Room 103 area (Acct Asst desk)'
Comment = 'Brother MFC-L8900CDW - Business Office Director area'
}
@{
IP = '192.168.3.227'
Port = 'TCP_192.168.3.227'
Name = 'Accounting Canon'
Driver = 'Canon Generic Plus PCL6'
Share = 'Accounting'
Location = 'Accounting (Room 103)'
Comment = 'Canon imageClass MF455DW - Lauren Hasselman'
}
@{
IP = '192.168.2.145'
Port = 'TCP_192.168.2.145'
Name = 'Room 103 Brother'
Driver = 'Brother Generic Jpeg Type2 Class Driver'
Share = 'Room103'
Location = 'Room 103'
Comment = 'Brother MFC-9340CDW - Ashley Jensen, Christina DuPras'
}
@{
IP = '192.168.2.67'
Port = 'TCP_192.168.2.67'
Name = 'Executive Office Canon'
Driver = 'Canon Generic Plus PCL6'
Share = 'Exec-Office'
Location = "Meredith's Office"
Comment = 'Canon imageClass MF743CDW - Meredith Kuhn only'
}
# Marketing / Sales
@{
IP = '192.168.3.44'
Port = 'TCP_192.168.3.44'
Name = 'Marketing Brother'
Driver = 'Brother Generic Jpeg Type2 Class Driver'
Share = 'Marketing'
Location = 'Room 217 (Marketing/Sales)'
Comment = 'Brother MFC-L8900CDW - Sales team'
}
# Culinary
@{
IP = '192.168.3.232'
Port = 'TCP_192.168.3.232'
Name = 'Kitchen Canon'
Driver = 'Canon Generic Plus PCL6'
Share = 'Kitchen'
Location = 'Kitchen Manager desk'
Comment = 'Canon imageClass MFC743CDW - Alyssa Brooks'
}
@{
IP = '192.168.3.88'
Port = 'TCP_192.168.3.88'
Name = 'Chef Brother'
Driver = 'Brother Generic Jpeg Type2 Class Driver'
Share = 'Chef'
Location = 'Kitchen Chef station'
Comment = 'Brother MFC-9330CDW - JD Martin / Chef'
}
# Deferred — drivers not yet installed:
# Front Desk Epson ET-5800 (192.168.2.147) ShareName: FrontDesk
# Health Svcs Bizhub C368 (192.168.1.138) ShareName: Health-206
) )
# --- Create TCP/IP printer ports --- Write-Output ''
Write-Host "`n--- Creating Printer Ports ---" -ForegroundColor Yellow Write-Output '=== Installing Printers ==='
foreach ($p in $printers) { foreach ($p in $printers) {
$portName = "TCP_$($p.IP)" Write-Output ''
try { Write-Output "--- $($p.Name) ($($p.IP)) ---"
$existing = Get-PrinterPort -Name $portName -ErrorAction SilentlyContinue
if (-not $existing) {
Add-PrinterPort -Name $portName -PrinterHostAddress $p.IP
Write-Host " [OK] Created port: $portName ($($p.Name))" -ForegroundColor Green
} else {
Write-Host " [SKIP] Port $portName already exists" -ForegroundColor DarkGray
}
}
catch {
Write-Host " [ERROR] Failed to create port $portName : $_" -ForegroundColor Red
}
}
# --- Test connectivity to each printer --- # Create TCP/IP port if needed
Write-Host "`n--- Testing Printer Connectivity ---" -ForegroundColor Yellow if (-not (Get-PrinterPort -Name $p.Port -ErrorAction SilentlyContinue)) {
Add-PrinterPort -Name $p.Port -PrinterHostAddress $p.IP
foreach ($p in $printers) { Write-Output " [OK] Port: $($p.Port)"
$result = Test-Connection -ComputerName $p.IP -Count 1 -Quiet -ErrorAction SilentlyContinue
if ($result) {
Write-Host " [OK] $($p.Name) ($($p.IP)) - reachable" -ForegroundColor Green
} else { } else {
Write-Host " [WARN] $($p.Name) ($($p.IP)) - NOT reachable" -ForegroundColor Yellow Write-Output " [--] Port exists: $($p.Port)"
}
# Add and share the printer
if (-not (Get-Printer -Name $p.Name -ErrorAction SilentlyContinue)) {
Add-Printer -Name $p.Name `
-DriverName $p.Driver `
-PortName $p.Port `
-Shared `
-ShareName $p.Share `
-Location $p.Location `
-Comment $p.Comment
Write-Output " [OK] Installed + shared: \\CS-SERVER\$($p.Share)"
} else {
Write-Output " [--] Already installed: $($p.Name)"
} }
} }
# --- Add shared printers (UNCOMMENT after installing drivers) --- Write-Output ''
<# Write-Output '=== Connectivity Check ==='
Write-Host "`n--- Creating Shared Printers ---" -ForegroundColor Yellow $all = @(
@{ Name='Copy Room Canon'; IP='192.168.2.230' }
foreach ($p in $printers) { @{ Name='BOD Brother'; IP='10.0.20.220' }
if ($p.Driver -eq "TBD") { @{ Name='Accounting Canon'; IP='192.168.3.227' }
Write-Host " [SKIP] $($p.Name) - driver not specified" -ForegroundColor Yellow @{ Name='Room 103 Brother'; IP='192.168.2.145' }
continue @{ Name='Executive Office'; IP='192.168.2.67' }
} @{ Name='Marketing Brother'; IP='192.168.3.44' }
@{ Name='Kitchen Canon'; IP='192.168.3.232' }
$portName = "TCP_$($p.IP)" @{ Name='Chef Brother'; IP='192.168.3.88' }
try { @{ Name='[DEFERRED] FrontDesk'; IP='192.168.2.147' }
$existing = Get-Printer -Name $p.Name -ErrorAction SilentlyContinue @{ Name='[DEFERRED] Health-206'; IP='192.168.1.138' }
if (-not $existing) { )
Add-Printer -Name $p.Name -DriverName $p.Driver -PortName $portName -Shared -ShareName $p.ShareName -Published foreach ($p in $all) {
Write-Host " [OK] Created printer: $($p.Name) (\\CS-SERVER\$($p.ShareName))" -ForegroundColor Green $ok = Test-Connection -ComputerName $p.IP -Count 1 -Quiet -ErrorAction SilentlyContinue
} else { $status = if ($ok) { '[OK] reachable' } else { '[WARN] NOT reachable' }
Write-Host " [SKIP] Printer $($p.Name) already exists" -ForegroundColor DarkGray Write-Output " $status - $($p.Name) ($($p.IP))"
}
}
catch {
Write-Host " [ERROR] Failed to create $($p.Name): $_" -ForegroundColor Red
Write-Host " Verify driver '$($p.Driver)' is installed: Get-PrinterDriver" -ForegroundColor Yellow
}
} }
#>
# --- Summary --- Write-Output ''
Write-Host "`n=== Print Server Summary ===" -ForegroundColor Cyan Write-Output '=== All Shared Printers on CS-SERVER ==='
Write-Host "`nPrinter Ports:" -ForegroundColor Yellow
Get-PrinterPort | Where-Object { $_.Name -like "TCP_*" } |
Select-Object Name, PrinterHostAddress |
Format-Table -AutoSize
Write-Host "Installed Printer Drivers:" -ForegroundColor Yellow
Get-PrinterDriver | Select-Object Name | Format-Table -AutoSize
Write-Host "Shared Printers:" -ForegroundColor Yellow
Get-Printer | Where-Object { $_.Shared } | Get-Printer | Where-Object { $_.Shared } |
Select-Object Name, PortName, ShareName, DriverName | Select-Object Name, ShareName, PortName, DriverName |
Format-Table -AutoSize Format-Table -AutoSize
Write-Host "`n=== Print Server Setup Complete ===" -ForegroundColor Cyan
Write-Host "Next steps:" -ForegroundColor Green
Write-Host " 1. Download and install printer drivers (see .NOTES in script header)"
Write-Host " 2. Uncomment the 'Add shared printers' section and re-run"
Write-Host " 3. Print a test page from CS-SERVER to each printer"
Write-Host " 4. Create GPOs in GPMC (see phase2-server-prep.md section 2.5)"