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:
@@ -1,123 +1,160 @@
|
||||
#Requires -RunAsAdministrator
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Phase 2.4: Set up print server on CS-SERVER.
|
||||
.DESCRIPTION
|
||||
Creates TCP/IP printer ports for all managed printers.
|
||||
Drivers must be installed manually before uncommenting the Add-Printer lines.
|
||||
Run on CS-SERVER via ScreenConnect.
|
||||
.NOTES
|
||||
Download drivers from manufacturer websites FIRST:
|
||||
- Epson ET-5800: https://epson.com/Support/Printers/All-In-Ones/ET-Series/Epson-ET-5800/s/SPT_C11CJ30201
|
||||
- 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.
|
||||
#>
|
||||
# Phase 2.6 — CS-SERVER Print Server Setup
|
||||
# Run on CS-SERVER via GuruRMM remote PowerShell
|
||||
# Last updated: 2026-05-20 (Howard) — rewritten with verified IPs and confirmed drivers
|
||||
#
|
||||
# Drivers confirmed installed on CS-SERVER:
|
||||
# Canon Generic Plus PCL6 (v3)
|
||||
# Brother Generic Jpeg Type2 Class Driver (v4)
|
||||
#
|
||||
# Deferred — need vendor driver downloaded to server first:
|
||||
# Front Desk Epson ET-5800 (192.168.2.147) — Epson Universal Print Driver
|
||||
# Health Svcs Konica Minolta Bizhub C368 (192.168.1.138) — Konica Minolta PCL6 Universal
|
||||
|
||||
Write-Host "=== Phase 2.4: Print Server Setup ===" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
$ErrorActionPreference = 'Continue'
|
||||
|
||||
# --- Ensure Print Server feature is installed ---
|
||||
Write-Host "--- Checking Print Server role ---" -ForegroundColor Yellow
|
||||
$printFeature = Get-WindowsFeature -Name Print-Server -ErrorAction SilentlyContinue
|
||||
if ($printFeature -and -not $printFeature.Installed) {
|
||||
# Verify Print Server role is installed
|
||||
$role = Get-WindowsFeature -Name Print-Server -ErrorAction SilentlyContinue
|
||||
if ($role -and -not $role.Installed) {
|
||||
Install-WindowsFeature -Name Print-Server -IncludeManagementTools
|
||||
Write-Host " [OK] Print Server role installed" -ForegroundColor Green
|
||||
Write-Output '[OK] Print Server role installed'
|
||||
} else {
|
||||
Write-Host " [OK] Print Server role already installed" -ForegroundColor Green
|
||||
Write-Output '[--] Print Server role already present'
|
||||
}
|
||||
|
||||
# --- Define printers ---
|
||||
$printers = @(
|
||||
@{ Name = "Front Desk - Epson ET-5800"; IP = "192.168.2.147"; ShareName = "FrontDesk-Epson"; Driver = "EPSON ET-5800 Series" }
|
||||
@{ 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" }
|
||||
@{ Name = "206 Health - Bizhub C368"; IP = "192.168.1.138"; ShareName = "Health206-Bizhub"; Driver = "KONICA MINOLTA Universal PCL" }
|
||||
@{ Name = "206 Nurse Station - Brother MFC-L8900CDW"; IP = "10.0.20.69"; ShareName = "Health206-Brother"; Driver = "Brother MFC-L8900CDW series" }
|
||||
@{ Name = "MemCare MedTech - Brother (model TBD)"; IP = "192.168.2.53"; ShareName = "MemCare-Brother"; Driver = "TBD" }
|
||||
@{ Name = "MemCare Director - Canon MF451CDW"; IP = "192.168.3.52"; ShareName = "MemDir-Canon"; Driver = "Canon Generic Plus UFR II" }
|
||||
@{ Name = "Kitchen Printer"; IP = "192.168.0.121"; ShareName = "Kitchen"; Driver = "TBD" }
|
||||
# Everyone gets this one — set as default via GPO
|
||||
@{
|
||||
IP = '192.168.2.230'
|
||||
Port = 'TCP_192.168.2.230'
|
||||
Name = 'Copy Room Canon'
|
||||
Driver = 'Canon Generic Plus PCL6'
|
||||
Share = 'CopyRoom'
|
||||
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-Host "`n--- Creating Printer Ports ---" -ForegroundColor Yellow
|
||||
Write-Output ''
|
||||
Write-Output '=== Installing Printers ==='
|
||||
|
||||
foreach ($p in $printers) {
|
||||
$portName = "TCP_$($p.IP)"
|
||||
try {
|
||||
$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
|
||||
}
|
||||
}
|
||||
Write-Output ''
|
||||
Write-Output "--- $($p.Name) ($($p.IP)) ---"
|
||||
|
||||
# --- Test connectivity to each printer ---
|
||||
Write-Host "`n--- Testing Printer Connectivity ---" -ForegroundColor Yellow
|
||||
|
||||
foreach ($p in $printers) {
|
||||
$result = Test-Connection -ComputerName $p.IP -Count 1 -Quiet -ErrorAction SilentlyContinue
|
||||
if ($result) {
|
||||
Write-Host " [OK] $($p.Name) ($($p.IP)) - reachable" -ForegroundColor Green
|
||||
# Create TCP/IP port if needed
|
||||
if (-not (Get-PrinterPort -Name $p.Port -ErrorAction SilentlyContinue)) {
|
||||
Add-PrinterPort -Name $p.Port -PrinterHostAddress $p.IP
|
||||
Write-Output " [OK] Port: $($p.Port)"
|
||||
} 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-Host "`n--- Creating Shared Printers ---" -ForegroundColor Yellow
|
||||
|
||||
foreach ($p in $printers) {
|
||||
if ($p.Driver -eq "TBD") {
|
||||
Write-Host " [SKIP] $($p.Name) - driver not specified" -ForegroundColor Yellow
|
||||
continue
|
||||
}
|
||||
|
||||
$portName = "TCP_$($p.IP)"
|
||||
try {
|
||||
$existing = Get-Printer -Name $p.Name -ErrorAction SilentlyContinue
|
||||
if (-not $existing) {
|
||||
Add-Printer -Name $p.Name -DriverName $p.Driver -PortName $portName -Shared -ShareName $p.ShareName -Published
|
||||
Write-Host " [OK] Created printer: $($p.Name) (\\CS-SERVER\$($p.ShareName))" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host " [SKIP] Printer $($p.Name) already exists" -ForegroundColor DarkGray
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " [ERROR] Failed to create $($p.Name): $_" -ForegroundColor Red
|
||||
Write-Host " Verify driver '$($p.Driver)' is installed: Get-PrinterDriver" -ForegroundColor Yellow
|
||||
}
|
||||
Write-Output ''
|
||||
Write-Output '=== Connectivity Check ==='
|
||||
$all = @(
|
||||
@{ Name='Copy Room Canon'; IP='192.168.2.230' }
|
||||
@{ Name='BOD Brother'; IP='10.0.20.220' }
|
||||
@{ Name='Accounting Canon'; IP='192.168.3.227' }
|
||||
@{ Name='Room 103 Brother'; IP='192.168.2.145' }
|
||||
@{ Name='Executive Office'; IP='192.168.2.67' }
|
||||
@{ Name='Marketing Brother'; IP='192.168.3.44' }
|
||||
@{ Name='Kitchen Canon'; IP='192.168.3.232' }
|
||||
@{ Name='Chef Brother'; IP='192.168.3.88' }
|
||||
@{ Name='[DEFERRED] FrontDesk'; IP='192.168.2.147' }
|
||||
@{ Name='[DEFERRED] Health-206'; IP='192.168.1.138' }
|
||||
)
|
||||
foreach ($p in $all) {
|
||||
$ok = Test-Connection -ComputerName $p.IP -Count 1 -Quiet -ErrorAction SilentlyContinue
|
||||
$status = if ($ok) { '[OK] reachable' } else { '[WARN] NOT reachable' }
|
||||
Write-Output " $status - $($p.Name) ($($p.IP))"
|
||||
}
|
||||
#>
|
||||
|
||||
# --- Summary ---
|
||||
Write-Host "`n=== Print Server Summary ===" -ForegroundColor Cyan
|
||||
|
||||
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
|
||||
Write-Output ''
|
||||
Write-Output '=== All Shared Printers on CS-SERVER ==='
|
||||
Get-Printer | Where-Object { $_.Shared } |
|
||||
Select-Object Name, PortName, ShareName, DriverName |
|
||||
Select-Object Name, ShareName, PortName, DriverName |
|
||||
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)"
|
||||
|
||||
Reference in New Issue
Block a user