(view source code of login_disconnect.bat_style_network_printer.ps as plain text)
$oldErrorActionPreference = $ErrorActionPreference
$ErrorActionPreference = 'SilentlyContinue'
# Remove the printer first, then remove the printerport
Get-Printer -Name 'LaserJet Marketing' | Remove-Printer
Get-PrinterPort -Name 'LPT1:' | Remove-PrinterPort
$ErrorActionPreference = $oldErrorActionPreference
page last modified: 2024-04-16; loaded in 0.0077 seconds