Write-Output "=== Printers on NURSESTATION-PC ===" Get-Printer | Select-Object Name, PortName, Shared, Type | Format-Table -AutoSize Write-Output "" Write-Output "=== Print shares on CS-SERVER ===" Get-ChildItem "\\CS-SERVER\*" -ErrorAction SilentlyContinue | ForEach-Object { Write-Output " $($_.Name)" } Write-Output "" Write-Output "=== Shared printers on CS-SERVER ===" $printers = Get-WmiObject Win32_Printer -ComputerName CS-SERVER -ErrorAction SilentlyContinue | Where-Object { $_.Shared -eq $true } $printers | ForEach-Object { Write-Output " $($_.Name) -> $($_.ShareName) [Port: $($_.PortName)] Location: $($_.Location)" }